Not applicable
Dec 16, 2015
06:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 16, 2015
06:28 PM
Understand from the example code of ASCloader,
the USIC setting was configure by ASC_Init();
What is correct setting if baud rate need change to 9600?
Also what is the default UART baud rate for ASCloader?
/* USIC : FIFO DPTR & SIZE MASK and POS Values */
#define USIC_CH_TBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_TBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_TBCTR_DPTRSIZE_Pos)
#define USIC_CH_RBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_RBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_RBCTR_DPTRSIZE_Pos)
void ASC_Init(void)
{
//********* MODULE USIC CONFIGURATIONS *************************
/*USIC 0 Channel 0 Mux Related SFR/Bitfields Configurations*/
WR_REG(USIC0_CH0->DX0CR, USIC_CH_DX0CR_DSEL_Msk, USIC_CH_DX0CR_DSEL_Pos,1);
// Data Pointer & Buffer Size for Transmitter Buffer Control
WR_REG(USIC0_CH0->TBCTR, USIC_CH_TBCTR_DPTRSIZE_Msk, USIC_CH_TBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
// Data Pointer & Buffer Size for Receiver Buffer Control
WR_REG(USIC0_CH0->RBCTR, USIC_CH_RBCTR_DPTRSIZE_Msk, USIC_CH_RBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
}
Regards
Joy
the USIC setting was configure by ASC_Init();
What is correct setting if baud rate need change to 9600?
Also what is the default UART baud rate for ASCloader?
/* USIC : FIFO DPTR & SIZE MASK and POS Values */
#define USIC_CH_TBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_TBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_TBCTR_DPTRSIZE_Pos)
#define USIC_CH_RBCTR_DPTRSIZE_Pos (0U)
#define USIC_CH_RBCTR_DPTRSIZE_Msk (0x0700003FU << USIC_CH_RBCTR_DPTRSIZE_Pos)
void ASC_Init(void)
{
//********* MODULE USIC CONFIGURATIONS *************************
/*USIC 0 Channel 0 Mux Related SFR/Bitfields Configurations*/
WR_REG(USIC0_CH0->DX0CR, USIC_CH_DX0CR_DSEL_Msk, USIC_CH_DX0CR_DSEL_Pos,1);
// Data Pointer & Buffer Size for Transmitter Buffer Control
WR_REG(USIC0_CH0->TBCTR, USIC_CH_TBCTR_DPTRSIZE_Msk, USIC_CH_TBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
// Data Pointer & Buffer Size for Receiver Buffer Control
WR_REG(USIC0_CH0->RBCTR, USIC_CH_RBCTR_DPTRSIZE_Msk, USIC_CH_RBCTR_DPTRSIZE_Pos,0x01000000); /* DPTR = 0, SIZE = 1 */
}
Regards
Joy
Labels
3 Replies
Dec 17, 2015
06:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 17, 2015
06:14 PM
Hello Joy,
For the bootstrap loader, the ASC is configured to be able to automatically detect and adjust to the baud rate from the host.
There is no need to separately configure the baud rate.
Regards,
Min Wei
For the bootstrap loader, the ASC is configured to be able to automatically detect and adjust to the baud rate from the host.
There is no need to separately configure the baud rate.
Regards,
Min Wei
Not applicable
Dec 17, 2015
06:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 17, 2015
06:28 PM
I have it, however always report an error.
Also confirm the UART was working since the test program for UART is work.
Dec 18, 2015
07:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 18, 2015
07:33 PM
Yes, the baud rate is determined by the host program, such as the one you are showing from the application note example.
But do you mean that you encounter an error when configuring the host baud rate setting?
Regards,
Min Wei
But do you mean that you encounter an error when configuring the host baud rate setting?
Regards,
Min Wei