Sercom UART Start of Frame detection

Discussions around product based on ARM Cortex M0+ core.

Moderator: nferre

ramtech_steven
Posts: 2
Joined: Wed Jul 02, 2014 2:50 pm

Sercom UART Start of Frame detection

Wed Jul 02, 2014 3:00 pm

Hey, just started out with the world of Arm and using a D20 Xplained Pro board. I've already noticed an issue with ASF in that I dont seem to be able to enable Start of Frame detection to wake up my board on UART RX.

If I look in usart.h the struct usart_config on line 547 I have the following
#ifdef FEATURE_USART_START_FRAME_DECTION

If I look for that it is defined further up on line 278 but only if 
#if (SAMD21) || (SAMR21) || defined(__DOXYGEN__)

It looks like a lot of features haven't been defined for SAMD20

Is there a way to enable this?

Thanks
pozz
Posts: 67
Joined: Fri Jun 13, 2014 2:55 pm

Re: Sercom UART Start of Frame detection

Wed Jul 02, 2014 4:25 pm

ramtech_steven wrote: It looks like a lot of features haven't been defined for SAMD20

Is there a way to enable this?
Maybe I'm wrong, but I think those features are hw and not sw related. In other words, SAM D20 parts doesn't generate any exception or flag when a start of frame is detected on a UART/SERCOM port.

I hope I am wrong.
ramtech_steven
Posts: 2
Joined: Wed Jul 02, 2014 2:50 pm

Re: Sercom UART Start of Frame detection

Wed Jul 02, 2014 4:38 pm

The feature is part of the hardware and it is definitely in the D20 range. It is another interrupt source which should wake the processor as soon as the RX line goes High -> Low (start bit) 

I've partially got it working at the minute by adding an if D20 then define it to the usart file and I have been able to set up a call back which is called when I press a key into a terminal window on my computer.

Currently I am having problems because it only happens once and I do not then get a buffer received callback so I never receive the data.

Ultimately I want the board to be asleep until some data is sent down the serial and it to stay on until it finishes 
pozz
Posts: 67
Joined: Fri Jun 13, 2014 2:55 pm

Re: Sercom UART Start of Frame detection

Wed Jul 02, 2014 5:23 pm

ramtech_steven wrote:The feature is part of the hardware and it is definitely in the D20 range
That's good :-)

Return to “SAM D20 Cortex-M0+ MCU”

Who is online

Users browsing this forum: No registered users and 2 guests