Wake up from deep sleep with UART and BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
DeTo_1826166
Level 3
Level 3
First like received First like given

Hello everyone,

   

To summarize :
I have a project where the BLE device have to get data from UART, handle it, then send data  through BLE to an app Phone (and same thing in the other way).

   

In my project I have to be able to wake up the BLE device with UART and then handle the data.

   

The problem is that data received is not consistent (and it is when I don't activate deepsleep).

   

Il followed instructions in page 171 of SCB_P4_v3_20, because wake up source is not only UART, but BLE too :

   

Then to test it I send data with a dummy byte (the uart should wake up during it) followed by some other bytes.
And the program resend data through UART.

   

So i expected to receive the same data I send without the dummy byte. But not at all. (it seems that the second byte play a role too, with something else than 0x01, like 0xAA up to the 4 first bytes can be wrong.., but i don't see why because the UART is supposed to synchronize on the start bit of the next byte, so the data have no role to play)

   

Enable or disable skipstart seems to change nothing.
I am not sure to handle correctly the lowpower process..

   


I tried the project on some hardware :  PSOC4, and an other PRoC.

   


In attachement, in  UartData.png : in blue what is send, in red what is receive

   

Here in attachements the projects files (based on Capsense slider project).

   

 

   

 

   

Thanks for your help.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The debug capabilities internal hardware when enabled will hinder the CPU entering deep sleep.

   

 

   

Bob

View solution in original post

0 Likes
2 Replies
DeTo_1826166
Level 3
Level 3
First like received First like given

It seems that with SWD pins disable (i changed debug select value from SWD to GPIO) it's working perfectly, but what is the link ?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The debug capabilities internal hardware when enabled will hinder the CPU entering deep sleep.

   

 

   

Bob

0 Likes