Simple questions about FC bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Simple questions about FC bootloader

817 Views
DiBosco
Contributor III

Folks,

Am trying to send FC bootloader information from an STM32 to a K60. (Please don't ask why!)

The protocol document AN2295, to me, is not clear on a couple of things:

1. How do you delimit frames? ie How do you know a byte you are looking at is the first byte of a frame?

2. The headers seems to be ASCII bytes and yet the binary seems to be binary. IS that really the case?

Many thanks!

Rob

Labels (1)
0 Kudos
3 Replies

629 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Robert:

Regarding your questions:

1) The protocol is based on commands using a Master - Slave fashion. The Master sends a command and the MCU should respond accordingly. So there are no delimiters but the code of the master should be aware of what is "to come" after sending a command.

2) Not sure what you mean with this question, can you be more specific?


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

629 Views
DiBosco
Contributor III

Hi Jorge,

Thanks for the reply.

1.I realise that the protocol is master/slave, but even allowing for that, there is [almost] always a way to delimit packets in a serial protocol. You seem to be saying that when you boot up, you assume that the first byte it receives will be a header. After that, there's no way of a slave knowing whether a byte is a header other than, maybe, there having been no traffic for a while?

2. If we take the write command command for example. That starts with ASCII E, but then seems to just send two bytes of binary data for the address. With the header being ASCII E, if the address and data were sent as two ASCII bytes per byte of data I could easily see how packets could be delimited, but they don't seem to be. It would appear it is an ASCII header of 'E', then two bytes of binary data in the form of an address and then two binary bytes of CRC. That's the way the protocol presents itself.

Also, surely, there should be a 32-bit address for Kinetis, but that doesn't seem to be mentioned anywhere!

Thanks,

Rob

0 Kudos

629 Views
DiBosco
Contributor III

Bump!

Would really appreciate some clarification on this, I have to get back on this today. Someone must have done this and be able to clarify please?

0 Kudos