There is no problem compiling under KEIL. I am using the STM32 SPL library.
We’d need to see the code for that.
Do you mean that when you debug the program line-by-line it works, but if you just run it it doesn’t? Or that if you compile it without compiler optimizations (
-O0) it runs but not with optimizations?
This is the two variables I use.
iic_comm_data_buff = 0
iic_comm_data_buff = 18
This is the function I am using. His function is to read the specified number of data from the iic_comm_data_buff array.the data_type is how many bytes of data are read
This is my operation, I want to read 2 bytes of data from the iic_comm_data_buff array, and then put it into Com1SetWordBuf_4x, but the result is not 18, but 254. I don’t know why.