- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I discovered a nasty bug in the cyhal_spi.c implementation.
In some places, it is not taken into account, that the element size of the buffer is 2, in case the bit width is > 8.
The data corruption would have been immediately apparent if anyone ever tried to use this, which weirdly doesn't seem the case...
Anyways, please see attached the fixed cyhal_spi.c for mtb-hal-cat1 release 1.5.0 (btw, I have to stay at this version, because for the used TARGET_CYSBSYSKIT-DEV-01, the SPI clock selection does not work properly in version 1.6.0... It selects the 16.5 bit divider and then returns an error because of that...)
Also I checked that the bug is still present in version 2.0.
Best regards
Boris
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Boris
I tried this at my end and was able to reproduce the error. I have notified the internal team regarding this and will get back with the solution at the earliest.
Thanks,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Hari ,
meanwhile I have tried the version 2.1.0, and while some parts of the problem around cyhal_spi data width have been changed, the bug is still present... It seems only parts of the fix have been applied...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content