Serial baud of 1M baud not working on AT91SAM3X8E

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

youthreewire
Posts: 8
Joined: Wed Jun 10, 2015 5:21 pm

Serial baud of 1M baud not working on AT91SAM3X8E

Wed Jun 10, 2015 5:30 pm

Hello,





I am using AT91SAM3X8E in Arduino Due. I am using the UART_BRGR register to set it to 1M baud rate for serial communication. Even after I use the formula as mentioned in the data sheet I am not able to achieve 1M baud speed. The ny maximum working speed appears to be 460800 baud. Could some one tell me how to configure the port to work at 1M baud and 2.5M baud. Thanks
youthreewire
Posts: 8
Joined: Wed Jun 10, 2015 5:21 pm

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Thu Jun 11, 2015 8:01 am

Anything?
youthreewire
Posts: 8
Joined: Wed Jun 10, 2015 5:21 pm

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Thu Jun 11, 2015 9:59 am

I put an FT232R with the serial1 and I am getting 1M baud. I need 2M baud though.
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Thu Jun 11, 2015 9:40 pm

Is there a fundamental reason why you are trying to send Serial Data over an RS-232 link at 2M baud?

Why not use USB for this?
If you *must* use the UART you can change the MCLK speed to something that will give you the exact speed you require (i.e. 64MHz) ofc the draw back is the part is running slower. :wink:
youthreewire
Posts: 8
Joined: Wed Jun 10, 2015 5:21 pm

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Fri Jun 12, 2015 4:29 am

I think the Arduino Due is clocked at 84Mhz. I want to stream some sensor data and it will be real time if I stream it at 2Mbps.
youthreewire
Posts: 8
Joined: Wed Jun 10, 2015 5:21 pm

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Fri Jun 12, 2015 7:06 am

I want to set the clock of SAM3X8E (arduino due) to 96 Mhz. I found some code which sets it to 114Mhz.How shall I set the due to 96mhz?

Code: Select all

#define SYS_BOARD_PLLAR (CKGR_PLLAR_ONE | CKGR_PLLAR_MULA(18UL) | CKGR_PLLAR_PLLACOUNT(0x3fUL) | CKGR_PLLAR_DIVA(1UL))
#define SYS_BOARD_MCKR ( PMC_MCKR_PRES_CLK_2 | PMC_MCKR_CSS_PLLA_CLK)
        
/* Set FWS according to SYS_BOARD_MCKR configuration */
EFC0->EEFC_FMR = EEFC_FMR_FWS(4); //4 waitstate flash access
EFC1->EEFC_FMR = EEFC_FMR_FWS(4);




/* Initialize PLLA to 114MHz */
PMC->CKGR_PLLAR = SYS_BOARD_PLLAR;
while (!(PMC->PMC_SR & PMC_SR_LOCKA)) {}




PMC->PMC_MCKR = SYS_BOARD_MCKR;
while (!(PMC->PMC_SR & PMC_SR_MCKRDY)) {}
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: Serial baud of 1M baud not working on AT91SAM3X8E

Sat Jun 13, 2015 4:11 am

The guaranteed maximum MCK freq is 90Mhz for this part.
See the data sheet under AC Characteristics

See the datasheet for information on how to set the PLL for your desired MCK rate.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest