RappId Bootloader S32K144, and use of LPUART1 in Appl.

cancel
Showing results for 
Search instead for 
Did you mean: 

RappId Bootloader S32K144, and use of LPUART1 in Appl.

274 Views
christofferjärl
Contributor II

I have the RappId Bootloader flashed to my S32K144 and successfully flashing appl. by Serial.

But  I,m having trouble initializing LPUART1 in my application.

Regardless what I try to do I cant change the baud rate from 57600bps.

Finally I realized that the LPUART1 gets initialized in bootloader, right?

I have tried to set, and then clear, the Reset in GLOBAL reg. and then reinitialize LPUART1, -but don't work.

Getting stuck with 57600 even when i try to set 9600 (LPUART1->BAUD = 0x0F000034;)

Waht am I doing wrong?

And also, are there more modules/peripherals/clocks initialized in the bootloader that I should know about?

Thank you! 

/Chris

Tags (2)
0 Kudos
1 Reply

61 Views
christofferjärl
Contributor II

I believe I found the problem.

My setup code in application reinitialize the clock source for LPUART1 as (copied from "clocks_and_modes.c"): 

PCC->PCCn[PCC_LPUART1_INDEX] |= PCC_PCCn_PCS(0b001) 

The "or" operator cause it to not take affect I intended, when it were already initialized once by Bootloader.

But anyhow, some more info of what is initialized and how in RappId Bootloader would be very good!

0 Kudos