UART wake-up from stop mode and data reception without loss of data on Kinetis K10

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

UART wake-up from stop mode and data reception without loss of data on Kinetis K10

1,520 Views
peterkrause
Contributor I

Hello,

I'm using the stop-mode on Kinetis MK10DX256VLH7 to save energy when the MCU is idle. Incoming UART data can wake-up the MCU by detecting the start bit. When I'm using a baudrate of 115200 Baud, all data is currupted when incoming data wakes-up the MCU. This phenomenom is also described in this thread by Mark Butcher:

Using Kinetis Low Power Stop Modes with unrestricted UART operation - a report

Is there any chance to fix this problem in software? I'm not able to change my hardware design, so I'm not able to put a delay to the UART pin. Furthermore I need to realize a baudrate of 115200 Baud, so I can't decrease the UART data rate.

At the moment I see only one solution. I have to send some dummy bytes to wake-up the MCU via UART. After waking-up, I have to ensure that the MCU stays awake for a certain time. When the MCU is awake, I can send my real data (after a delay of sending the dummy data) to the MCU.

Is there any other solution?

Thank for your reply.

Labels (1)
0 Kudos
5 Replies

875 Views
mjbcswitzerland
Specialist V

Hi Peter

There is no problem using the (normal) STOP mode as long as you configure that PLL (if used) to stay on in the STOP mode (IREFSTEN bit in MCG_C1).

The difficulty is only with VLPS mode where this is disabled.

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

KL05: µTasker FRDM-KL05Z support

KL25: µTasker Kinetis FRDM-KL25Z support  / µTasker Kinetis TWR-KL25Z48M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos

875 Views
peterkrause
Contributor I

Hi Mark,

I'm using the FLL to generate my clocks beacause I'm using an RTC oscillator. Does it also work with the FLL?

Regards

Peter Krause

0 Kudos

875 Views
mjbcswitzerland
Specialist V

Peter

I made a mistake with my information since the PLL is controlled by the PLLSTEN bit in MCG_C5. The internal oscillator is controlled in MCG_C1.

Unfortunately I don't think that you can use the 32kHz RTC and FLL for this because the FLL is alwas stopped in STOP mode and takes quite some time to lock again.

When I work with the KL02 µTasker FRDM-KL02Z support it has a 32kHz main oscillator (no RTC but otherwise the same) and STOP mode will always lose UART reception, even at low Bauds. The only way around this is to use the 4MHz IRC, which limits the processor speed also to 4MHz.

In your case you also have a PLL option which could be used but that will need a second crystal on EXTAL0 since the input frequency must be >= 2MHz.

Regrds

Mark

Kinetis: http://www.utasker.com/kinetis.html

KL05: µTasker FRDM-KL05Z support

KL25: µTasker Kinetis FRDM-KL25Z support  / µTasker Kinetis TWR-KL25Z48M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos

875 Views
peterkrause
Contributor I

Hi Mark,

the target system is a low-power device. We decided to use a 32 kHz oscillator because the current draw is higher when using a high frequency oscillator and the PLL.

At low baud rates I don't see problem of loosing data. 9600 Baud works fine at the moment. But for 115200 Baud I don't see another solution than waking-up the MCU with dummy data before I send my real data. (for the case that I don't want to change my hardware design and increase the current draw).

Regards

Peter Krause

0 Kudos

875 Views
mjbcswitzerland
Specialist V

Hi Peter

With the K10 I think that this is the only option to keep the power consumption at a minimum.

The KL devices can run from the FLL but clock the UARTs from the IRC, which can also remain on in STOP mode (the K10 has a fixed clock source which will alwas be disabeld in STOP mode). However the Baud rate resolution from this clock is not good...

Regards

Mark

Kinetis: http://www.utasker.com/kinetis.html

KL05: µTasker FRDM-KL05Z support

KL25: µTasker Kinetis FRDM-KL25Z support  / µTasker Kinetis TWR-KL25Z48M support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos