UART for communication

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART for communication

ソリューションへジャンプ
1,723件の閲覧回数
arbnorzeqiri
Contributor I

Hi all,

I'm new to Kinetis MCUs and I want to know how to work with UART, does it have any library for that ?

p.s. My MCU is MKL05Z

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
834件の閲覧回数
martynhunt
NXP Employee
NXP Employee

Hi Arbnor,

You can find some sample code for the KL05 on the following web page: KL05-SC

The download you are looking for is KL05-SC. Inside there should be an IAR project that uses UART and I2C.

Also, the reference manual has a description of all the UART registers. You can find it and other documentation here: KL0 Documentation

Let me know if you have any questions.

Regards,

Martyn

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
834件の閲覧回数
pradyumnakammar
Contributor III

Thank you Martyn ... UART0 clock was not the problem i had not disabled one of the interrupts which was interfering. 

0 件の賞賛
返信
835件の閲覧回数
martynhunt
NXP Employee
NXP Employee

Hi Arbnor,

You can find some sample code for the KL05 on the following web page: KL05-SC

The download you are looking for is KL05-SC. Inside there should be an IAR project that uses UART and I2C.

Also, the reference manual has a description of all the UART registers. You can find it and other documentation here: KL0 Documentation

Let me know if you have any questions.

Regards,

Martyn

0 件の賞賛
返信
834件の閲覧回数
pradyumnakammar
Contributor III

hi

martynhunt

im new to Kinetis L 05 MCUs can you give me examles ti use UART intrrupt for communication serially ?? i have referred KL05-SC n used polling method

i want to use the interrupt method during wake up (MCU waking from LLWU pin) then reconfig to polling type


when i tried to do the above at the later part when its waiting in a while loop   @ while(!(UART_S1_REG(channel) & UART0_S1_RDRF_MASK));it goes to hard fault


i dont know how to solve ... need assistance


regards

Pradyumna


0 件の賞賛
返信
834件の閲覧回数
martynhunt
NXP Employee
NXP Employee

Hi Pradyumna,

Have you made sure that the UART0 clock is enabled by setting SIM_SCGC4[UART0] = 1. Also, what clock source are you using for UART0? (SIM_SOPT2[UART0SRC]).

Best regards,

Martyn

0 件の賞賛
返信