AnsweredAssumed Answered

K64 custom freedom bootloader with RTS support (RS485)

Question asked by roymessinger on Mar 21, 2017
Latest reply on Mar 27, 2017 by Mark Butcher

I've been working with the freedom bootloader on the FRDM-K64F board (UART1), and all worked well. I've now changed the FRDM board to my custom board (the RX,TX pins of the freedom_bootloader code did not change, as in the FRDM board I also changed to UART1 and it worked fine). I'm working with half duplex RS485.

I cannot connect with the KinetisFlashTool. I'm guessing the reason is my custom board is working with half duplex RS485. As such, I need to enable the RTS of the chip, just as I did with my application on this board:


My problem is I don't know where to put these 2 lines in the freedom_bootloader code. If placed in the wrong place (I guess before the UART is init) there's a hard fault.

I've found this function: scuart_poll_for_activity, but don't know if this is the correct place. 

When I click 'Connect' in the GUI of Kinetis FLash Tool, there's an autoBaudRate function which get interrupted, in which the baud rate is calculated (counts the transitions of some signal, I guess), then it goes to the UART configuarion function.

In my board the autoBaudRate function is not called, which leads me to the conclusion it is somehow connected to the RS485 half duplex issue?

Any ideas?