Page 12 of 60
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 11 May 2020 17:34
by arkadiusz.makarenko
Ok. I have setup to carry on working on firmware.
It is not my CD32. I am not sure if my CD32 is flaky, or Riser actually messes up with my CD32. As sync is lost ocasionally and keyboard just sometimes work. Every 3rd or something keyboard press. (On diagrom)
I hooked up Riser to my Amiga 500 keyboard port, and responsivness is perfect. Clock pulse tolerance is enormous as well.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 11 May 2020 19:56
by arkadiusz.makarenko
Wow. Current ST usb library implementation for keyboard is very very buggy, if I press more than 4 buttons, they change value to 1 .... This messes up with depressing buttons.
I will revert library to f105 version and see if this helps.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 11 May 2020 23:12
by arkadiusz.makarenko
I did find some issues with keybaord behaviour. Issue is that if multiple buttons (more than 4 or 5) are pressed then weird values appear on reading report. It may be overflow, but each time values are the same.
I will poke this more, I just hope I will not have to implement keyboard report parser, and still will be allowed to use keyboard in boot mode.
I pushed changes to repository. Current implementation may not be ideal, but should be pretty much usable.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 11 May 2020 23:17
by terriblefire
arkadiusz.makarenko wrote: 11 May 2020 23:12
I did find some issues with keybaord behaviour. Issue is that if multiple buttons (more than 4 or 5) are pressed then weird values appear on reading report. It may be overflow, but each time values are the same.
I will poke this more, I just hope I will not have to implement keyboard report parser, and still will be allowed to use keyboard in boot mode.
I pushed changes to repository. Current implementation may not be ideal, but should be pretty much usable.
Thanks i'll try that out tomorrow along with a TF330 rev 3 that
@supaduper sent me.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 13 May 2020 22:44
by arkadiusz.makarenko
I spent some time trying to understand how usb keyboards send data. Hid report is 8 bytes, and it seems that it can record up to 4 main keys at the same time (I assume special keys like shift, alt etc are recorded separately). Above this report records all keys as 01.
Now I have a bug which doesn't register depressed buttons correctly. It may be simple as not clearing one of variables correctly. And I need to think how to handle "overflow" of keys pressed on usb keyboard.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 14 May 2020 01:26
by terriblefire
arkadiusz.makarenko wrote: 13 May 2020 22:44
I spent some time trying to understand how usb keyboards send data. Hid report is 8 bytes, and it seems that it can record up to 4 main keys at the same time (I assume special keys like shift, alt etc are recorded separately). Above this report records all keys as 01.
Now I have a bug which doesn't register depressed buttons correctly. It may be simple as not clearing one of variables correctly. And I need to think how to handle "overflow" of keys pressed on usb keyboard.
Apologies.. ive not had a chance to test. Couple of things i've found..
My ATX PSU is low voltaging out at 4.2v ... annoying.
I've been debugging the CD32 ITX Clone.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 14 May 2020 15:06
by arkadiusz.makarenko
terriblefire wrote: 14 May 2020 01:26
arkadiusz.makarenko wrote: 13 May 2020 22:44
I spent some time trying to understand how usb keyboards send data. Hid report is 8 bytes, and it seems that it can record up to 4 main keys at the same time (I assume special keys like shift, alt etc are recorded separately). Above this report records all keys as 01.
Now I have a bug which doesn't register depressed buttons correctly. It may be simple as not clearing one of variables correctly. And I need to think how to handle "overflow" of keys pressed on usb keyboard.
Apologies.. ive not had a chance to test. Couple of things i've found..
My ATX PSU is low voltaging out at 4.2v ... annoying.
I've been debugging the CD32 ITX Clone.
I don't think it is worth testing yet. Need to solve this missed depressed buttons issue first.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 14 May 2020 18:54
by Homer79
I knew I was an article about this a while ago, I was sure it was 6 buttons for usb keyboards
http://xahlee.info/kbd/keyboard_n-key_r ... sting.html
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 14 May 2020 19:08
by arkadiusz.makarenko
I will have a look at this. Thank you.
Question is if it is any key. I will need to desypher HID report itself (it is painful). It may be 4 allocated for general keys and additional 2 for special keys like shift, ale enter etc?
Report has 8 bytes, which first byte is most likekly ReportID.
Re: TF CD32 Riser Revision 2 Design Complete
Posted: 14 May 2020 19:10
by terriblefire
arkadiusz.makarenko wrote: 14 May 2020 19:08
I will have a look at this. Thank you.
Question is if it is any key. I will need to desypher HID report itself (it is painful). It may be 4 allocated for general keys and additional 2 for special keys like shift, ale enter etc?
Report has 8 bytes, which first byte is most likekly ReportID.
Honestly cant think of any situation where more than 4 keys are needed at the same time.
S