Reputation: 1
I'm trying to use UART in my MSP-EXP430G2ET dev board that runs on msp430g2553 microcontroller. The UART works fine while debugging with the JTAG but when I close my debug environment and unplug my dev board and re plug it, my board resets every time it receives something over UART. How do I rectify this error ?
Transmitting through UART posed no problem but when I try to read through UART, my dev board resets.
.section .resetvec,"ax",@progbits
.word _start
.section .text
.global _start
.global _isr_uart_rx
_start:
mov #0x0280,R1
mov.w #0x5A80,&0x0120
bis.b #0x01,&0x0061
bis.b #0x80,&0x0061
mov.b #0x00,&0x0060
mov.b #0x68,&0x0062
mov.b #0x00,&0x0063
mov.b #0x02,&0x0064
mov.b #0x45,&0x0022
bic.b #0x02,&0x0022
bic.b #0x41,&0x0021
mov.b #0x08,&0x0024
mov.b #0x08,&0x0025
mov.b #0x06,&0x0026
mov.b #0x06,&0x0041
mov.b #0x08,&0x0027
bic.b #0x01,&0x0061
bis.b #0x01,&0x0001
bis.b #0x40,&0x0021
eint
exit:
jmp exit
_isr_uart_rx:
mov.b #0x01,&0x0021
mov.b &0x66,R5
bic.b #0x01,&0x0003
reti
.section .uart0rxvector,"ax",@progbits
.word _isr_uart_rx
Upvotes: 0
Views: 18