cancel
Showing results for 
Search instead for 
Did you mean: 

Fault in STM8S/A Standard peripheral library

Birdo
Associate II

Hello,

I am working with the CAN peripheral on the STM8AF5288.

When I was using the standard peripheral library (delivered by STM) I found a fault in the code. It is about the STSW-STM8069 with version 2.3.1. (https://www.st.com/en/embedded-software/stsw-stm8069.html)

The fault is in line 880 of the file stm8s_can.c.

The assert_param will validate the uint8_t variable if it is <= to DLC_MAX.

DLC_MAX is a value of 0x08. So the values 0, 1, 2, 3, 4, 5, 6, 7 and 8 are valid.

The 8 must not be valid because it will return _Data[8] and that is out of range of the array __IO uint8_t _Data[8] = {0} from line 46.

Hopefully this fault will be adjusted in a new version release.

Kind regards,

Birdo

1 REPLY 1
WilkoL
Senior

I'm afraid ST will not fix anything for the STM8 line anymore. It look as if they have abandoned it.