AnsweredAssumed Answered

Bootloader in half-duplex (RS485) environment

Question asked by Robert Poor on Jun 12, 2017
Latest reply on Aug 1, 2017 by Robert Poor

My client is building a system that will be potted in epoxy with half-duplex RS485 as the sole communication link to the KL27Z (notably there is no JTAG).  This means that any character that the KL27Z transmits over LPUART0 will be simultaneously received by LPUART0.

 

In our firmware, we avoid these "ghost echo" characters by disabling LPUART's receiver whenever we transmit a character.  (This is safe because our RS485 protocols are strictly master / slave, and the master won't be trying to transmit serial data when the KL27Z is transmitting.)

 

I gather that I'll need to write a custom flash-based bootloader to work in this situation.  My current development plan is as follows:

  1. Verify that I can communicate with the ROM-based bootloader on a stock FRDM-KL27Z via blhost [DONE]
  2. Compile an unmodified flash-based bootloader for the FRDM-KL27Z board
  3. Load unmodified flash-based bootloader into the FRDM-KL27Z board and confirm I can communicate with it via blhost
  4. Modify the bootloader for half-duplex RS485 serial communication (by disabling LPUART receiver whenever transmitting a character)
  5. Verify operation on custom KL27Z based board

 

I'm currently stuck at step 2: where do I find the recipe for the 2.0 bootloader, including compiling from source code and loading into the FRDM27 board?

 

Thanks in advance!

Outcomes