cancel
Showing results for 
Search instead for 
Did you mean: 

Test F7 SPI CRC Generation

Ba5tian
Associate II

Hello,

i have a programm which is sending 2bytes + 16bit CRC from SPI2.

There are two STM32F765 on my board. The test programm is generated with CubeIDE and only SPI2 initiallyzed.

One MCU is calculating the crc correct and the other is not correct.(Checked with an online crc calculation website)

polynom used: 0x9021

Result from MCU 1(correct): 0x08 0x06 0x24 0xDC

Result from MCU 2(not correct): 0x08 0x06 0x63 0xEE

I have checked the register before sending, they are equal.

After sending the registers are equal, the only differnce is in SPI2->DR where the calculated crc can be seen.

Regards,

Bastian

Is there a way to test if the processor hardware damaged?

12 REPLIES 12

I am out of ideas.

As Clive said above, post the complete compilable minimal program so that the problem could be reproduced.

JW

Ba5tian
Associate II

Hi,

we finally found the solution to the wrong spi crc.

Somtimes the crc got calcutated right and sometimes wrong.

All SPI Pins where used with port speed very high, after changing to medium the crc generation is working perfect.

Now we added 47Ohm resistors in the mosi, miso, ckl and nss line, changed the port speed back to very high and anabled the compensation cell. The crc is calculated right.

In conclusion i suspect that the internal powersupply can't deliver enough power to the spi peripheral.

Wow, this was unexpected.

Problems with high GPIO settings are usually related to reflections - one device "sees" more clicks than there were transmitted - that's why termination helps.

Thanks for coming back with the solution, this is very helpful.

JW