#1 Bad checksum answer

open
nobody
5
2012-03-13
2012-03-13
Pit
No

When performing the following sequence :

1 - writing to Reg. at address 00h (COMMUNICATION)
2 - reading FW_VERSION
3 - reading FW_VERSION

the sensor answer in the correct way only to 1 and 3, but answer BAD CHECKSUM to message 2. Sent checksum is OK in 1,2 and 3.

I suspect that there is a problem resetting new_packet.data_length in USART_STATE_ADDRESS ( ProcessNextCharacter( ) function ).
Probably after 1 new_packet.data_length retain the old value when the state machine skip the variable update and goes to the checksum calculation that uses the data_length info.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks