AnsweredAssumed Answered

Unable to write UART_THR Register in BF532 (UART in BF532)

Question asked by Anwar on Sep 2, 2010
Latest reply on Sep 6, 2010 by Anwar

Hi,

     I am new at blackfin.

 

I have a custom bf532 board with SPI, NAND and SDRAM.

 

I am using vdsp to send some data on UART. Using emulator/vdsp I can see that my write to UART_THR Register doesnot effect the register status.And nothing is appearing on TX pin.

 

 

/*****************************************************************************
* main.c
*****************************************************************************/
#include <cdefbf532.h>
void delay(void);
void toggle(void);
void uart_init(void);
void transmit(void);
int main( void )
{
uart_init();
transmit();
}
void uart_init(void){
*pUART_GCTL = 0x0001;    // uart enable
*pUART_LCR  = 0x0080;   // setting DLAB
*pUART_DLL =  0x0036;   //setting divisor
*pUART_DLH = 0x0000;
*pUART_MCR = 0x0000;
}
void transmit(void){
     *pUART_LCR  = 0x0003;     //clearing DLAB  // setting baudrate
     while (!(*pUART_LSR & THRE)) { /* wait */ }
*pUART_THR  = 0x00FF;
}

 

Currently i am interested in TX operation only.

Outcomes