Transmission not happening in UART

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Transmission not happening in UART

841 次查看
chandrasekhar
Contributor I

Hello,

 

  Hello I am using UART0 in my code. When I run the code it is not transmitting any data to UART0 instead it reaches to default handler function given below and suspends?

And also I am not using any interrupts also.

void Default_Handler()

{

__asm("bkpt");

}

can anyone please help me in this?

Original Attachment has been moved to: UART0.c.txt.zip

标签 (1)
标记 (3)
0 项奖励
回复
2 回复数

550 次查看
chandrasekarkan
Contributor III

Hi

Are you using MQX RTOS?... then,

1. go to installed MQX directory/config/yourBoard

2. open userconfig.h, enable BSPCFG_ENABLE_ITTYA and rebuild the BSP library.

3. In your code,

            MQX_FILE_PTR serPort = fopen("ittya:", NULL);

   to initialize UART0.

4. then write( serPort, "Hello", 5); will send "Hello" via. serial port.

0 项奖励
回复

550 次查看
chandrasekhar
Contributor I

Hi,

Sorry for my incomplete question. Iam not using MQX. I am using baremetal only. In my code also I am using polling based. Anyways I solved the above issue.

I gave the clock settings before multiplexing the pin and it resolved. previously I am enabling the clock after multiplexing the pin.  Thank you for quick reply.

0 项奖励
回复