UART after Deep Sleep (LPC1114)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART after Deep Sleep (LPC1114)

1,022件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shashankiim on Sun Jun 30 06:11:37 MST 2013
Hey

I have multiple boards with LPC1114 (302). As per the design the system remains in deep sleep mode after initial setup of all the peripherals. An external interrupt wakes it up. After waking up the LPC1114 transmits some UART data and goes back to deep sleep.

However the system is not transmitting proper UART data. It always transmits garbage values with dots and weird characters. If instead of "deep sleep" I make it "sleep mode" the UART data transmitted is perfect.

I do not understand why is it happening. Has this happened to anyone before ?
I would really immensely appreciate any help or pointers in this issue.

Regards
Shashank
0 件の賞賛
返信
5 返答(返信)

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shashankiim on Wed Jul 03 00:01:53 MST 2013
I got the solution. It seem that after deep sleep wake up the PLLs do not set up properly.

After trying all the things, I finally switched off the PLL and used IRC directly as the system clock and started running the system at 12MHz. This did the trick and the outputs are proper.
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shashankiim on Sun Jun 30 21:10:20 MST 2013

Quote: Serge
I am not familiar with this MCU but what happens to the registers while the MCU is in deep sleep? Do they keep their values or are they reset when the MCU wakes up? This could happen if internally the power to the memory section where the registers reside is turned off.
Check SYSAHBCLKCTRL register when comming out of deep sleep.



According to datasheet

In Deep-sleep mode, the system clock to the processor is disabled as in Sleep mode. All analog blocks are powered down, except for the BOD circuit and the watchdog oscillator, which must be selected or deselected during Deep-sleep mode in the PDSLEEPCFG register.

Deep-sleep mode eliminates all power used by the flash and analog peripherals and all dynamic power used by the processor itself, memory systems and their related controllers, and internal buses. The processor state and registers, peripheral registers, and internal SRAM values are maintained, and the logic levels of the pins remain static.


To be specific if I program to output a string "open close " I get the constant  UART output as "1=M··=A·9·"
I do not understand why this is happening.
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Sun Jun 30 15:59:02 MST 2013
I am not familiar with this MCU but what happens to the registers while the MCU is in deep sleep? Do they keep their values or are they reset when the MCU wakes up? This could happen if internally the power to the memory section where the registers reside is turned off.
Check SYSAHBCLKCTRL register when comming out of deep sleep.
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by shashankiim on Sun Jun 30 08:45:59 MST 2013
but every time before transmitting I enable and clear the Tx Rx FIFO. Out of the whole string on UART many times I get a few initial characters correct while others as dots otherwise the whole string is a garbage other times.

Additional info : before deep sleep I switch clock to watchdog and after wakeup I switch it back to PLL with IRC with the system core clock to 48MHz

what can be the issue ?
0 件の賞賛
返信

996件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Jun 30 06:53:02 MST 2013

Quote: shashankiim
I would really immensely appreciate any help or pointers in this issue.



:confused:

Without seeing a single line of code I would guess it's a FIFO problem.
0 件の賞賛
返信