Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:40 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ARMmite H7 - 5.07.02b1 keyboard LEDs not working

Author Message
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 05:50am 20 Jun 2024
Copy link to clipboard 
Print this post

Hi,

I have a Nucleo-H743ZI (v1) board that I purchased back in early 2019 that I have finally got around to playing with. I have loaded up the 5.07.02b1 firmware and all seems to be working OK except for the Caps Lock and Num Lock LEDs on the keyboard.
All the keyboard keys appear to function ok, including Caps Lock and Num Lock which do toggle the respective modes, just the LEDs never light up to show which modes are actually active.

I have tried 3 different keyboards which all show the same problem and all 3 work fine when connected to a PC.

For testing I only have the keyboard option set:-

   OPTION USBKEYBOARD US, 91

I have tried the OPTION USBKEYBOARD US, 91, NOLED  - just in case, but it makes no difference (as expected). I have also reloaded the firmware multiple times with no change in behaviour.

Does anyone else use an H7 with a usb keyboard attached running the 5.07.02 firmware and have or not have this problem with the keyboard LEDs?

Have I missed a step in setting things up, or any other suggestions?

Phil.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 12:55am 21 Jun 2024
Copy link to clipboard 
Print this post

I have tested on both a Nucleo-H743ZI (v1) and Nucleo-H743ZI2 (v2)
with these results for two different USB keyboards.

Numlock and capslock initially did not appear to work at all, but I found on both that the lights worked every 3rd time. (both V1 and V2)
i.e.
1 press caps lock gives caps ON   but no light
2 press caps lock gives caps OFF
3 press caps lock gives caps ON  with Light
4 press caps lock gives caps OFF (but light remains)
5 press caps lock gives caps ON  with Light (was already on)
6 press caps lock gives caps OFF and light now gone

Can you confirm yours is the same.

I may a look at CMM2 source sometime and see if there is a difference.

Gerry
Latest F4 Latest H7
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 07:02am 21 Jun 2024
Copy link to clipboard 
Print this post

Hi Gerry,

My keyboards produce different results when testing multiple key presses:-

1. Keyboard does not light the LEDS at all, but the Caps Lock / Num Lock keys do work.
2. Second keyboard follows the pattern you describe, except that after power up / reset the first Lock key requires 5 presses before the LED comes on, thereafter either Lock key toggles the LED every 3 presses. Doesn't matter which Lock key is used first, it needs 5 presses. I didn't try a mix of the 2 Lock keys - getting too complicated.
3. Third keyboard (a Mini 84 key version) doesn't light the LEDs and locks up after the fourth key press (the same for both Caps and Num Lock).
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:19am 21 Jun 2024
Copy link to clipboard 
Print this post

Hi erbp,

Are you referring to "key illumination" ?
I think Peter made a remark about that earlier for PicoMite.
I think he said that the keyboard illumination is basically a second USB device inside the keyboard, with its own controller connected to a hub inside the keyboard.

AFAIK there is no support for such key illumination in any of the Mites.

Volhout
PicomiteVGA PETSCII ROBOTS
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 08:57am 21 Jun 2024
Copy link to clipboard 
Print this post

Hi Volhout,

No, not referring to "key illumination".
I am referring to the LED lights on the keyboard that indicate when Caps Lock, Num Lock and Scroll Lock are active. I am not interested in, nor tested, the Scroll Lock function, but Caps Lock and Num Lock are definitely useful when they work.

Cheers,
Phil.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:07am 21 Jun 2024
Copy link to clipboard 
Print this post

  Quote  
2. Second keyboard follows the pattern you describe, except that after power up / reset the first Lock key requires 5 presses before the LED comes on, thereafter either Lock key toggles the LED every 3 presses. Doesn't matter which Lock key is used first, it needs 5 presses.

Yes I have three that do exactly that. 2 are PS2/USB and one USB.
Another does the lockup thing after 4 presses as for your number 3.
Latest F4 Latest H7
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 11:20am 21 Jun 2024
Copy link to clipboard 
Print this post

In case it is somehow important, my keyboards 1 & 2 referenced above are USB only.
The Mini Keyboard (#3) is combined PS2/USB.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 12:04am 22 Jun 2024
Copy link to clipboard 
Print this post

Try this.
ArmmiteH743.zip

It has a delay added in keyboard.c source which seems to fix the ones behaving badly, but the one that locks up still locks up so will need noLED parameter.

I don't have the latest CMM2 source but the 5.07.00 version looks the same as H7 so I am wondering if CMM2 has the same issue or is fixed in the later versions.

Let me know if its fixed and does not cause unintended issues and I will include in the next beta.

keyboard.c source code change

 case HID_DEMO_KEYBOARD:
   if (Appli_state == APPLICATION_READY)
   {
     keyboardseen=1;
     USBH_KeybdDemo(&hUsbHostFS);
     if(!Option.noLED  && (sendlights & 0x8000)){
     USBH_HID_SetReport(&hUsbHostFS,HID_SEND_DATA,0,(uint8_t *)&sendlights,1);

        uSec(100);  //Delay added as fix for CapsLock,NumLock,ScrollLock
             // not being set G.A. 22/06/2024
             // https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=17037
     count--;
     if(!count){
     sendlights &=0xFF;
     count=32;
     }
     }
   }
   break;



Gerry
Latest F4 Latest H7
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 07:13am 22 Jun 2024
Copy link to clipboard 
Print this post

Hi Gerry,

Tested the patched version but results are mixed.

Keyboard 1. The LED toggles on each press of the associated Lock key, BUT the keyboard locks up after 2 Lock key presses. Doesn't even need to be the same key, locks after 1 Caps Lock and one Num Lock key press.  

Keyboard 2. Works correctly. LED toggles on each Lock Key press and keyboard did not lock up during my testing.

Keyboard 3. LED toggles on each Lock Key press, BUT keyboard still locks up after the 3rd Lock key press.

So at least I now have one out of 3 keyboards that works properly. I can live with that, so don't spend more time on it on my account. If you do make further changes I am happy to test with my 3 keyboards.

Thanks for taking a look at this.
Cheers,
Phil.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 09:43am 22 Jun 2024
Copy link to clipboard 
Print this post

Hi Phil,
Can you try this one. Only change is delay is 10us in lieu of 100us.
My three keyboards still work and the lockup one still locks after two Lock keys.
If 10us OK then I will use 10us.
Gerry

ArmmiteH743.zip
Latest F4 Latest H7
 
erbp
Senior Member

Joined: 03/05/2016
Location: Australia
Posts: 192
Posted: 07:04am 23 Jun 2024
Copy link to clipboard 
Print this post

Hi Gerry,
Apologies for not getting the testing done earlier.

Results:

Keyboard 1. LED now comes on after the 3rd press of the relevant Lock key and then STAYS ON. The Lock key does work, even though the LED doesn't show the change in mode. No lockups encountered.

Keyboard 2. Still works correctly (as it did for the previous test).

Keyboard 3. LEDs stay off and keyboard locks on the FIRST press on a Lock key (LED probably doesn't change as the lockup occurs before the LED state change gets processed?)

As I said, I have one keyboard that works ok with this module - I can get by with that.

Thanks,
Phil.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 07:41am 23 Jun 2024
Copy link to clipboard 
Print this post

OK will set delay to 10uS in the next beta. noLED will be available as a work around for problem keyboards.
Latest F4 Latest H7
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024