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