This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP432E401Y: Uart interrupt

Part Number: MSP-EXP432E401Y
Other Parts Discussed in Thread: MSP432E401Y

Hi, I programmed MSP-EXP432E401Y board to send and receive characters in UART0. The program works properly, but now I want to implement an interrupt in the uart so the code could read once something arrives instead of being checking everytime. I have been looking up how to enable such thing and I have some doubts. First, enable  processor interrupts and for what I figured out by this document  which states to do 

and it is what you do in the driverlib

Now, to enable UART interrupt you call MAP_IntEnable(INT_UART0); and studying the library I figured out that you put NVIC->EN0 = 100000. Where do I can find those values in the MSP432E401Y Datasheet? I didn;t find any info about that. I am asking that because I am not using the driverlib because I want to learn deep ARM programming (I know that MSP432P401 is easier but I bought this MCU)

  • The CMSIS (ARM) equivalent for IntEnable(INT_UART0) would be:

    > NVIC_EnableIRQ(UART0_IRQn);

    The _IRQn names are in msp432e401y.h. (Hint: paste the above line into your code, then right-click on UART0_IRQn and "Go To Definition".)

  • OUU Thanks!!. There is any documentarion about core_cm4.h library? By the way, the only method to enable system interrupts in the M4F is writing in assembler this code (of course if we are using CC Studio) right? 

    __asm(" mrs r0, PRIMASK\n"
    " cpsid i\n"
    " bx lr\n");

    By reading the ARM file and for what I understood is the only option

  • ARM has a fairly large documentation set. You can go to developer.arm.com and search for NVIC_EnableIRQ, and then look around in the tree nearby.

    core_cm4.h  is in ccs_base/arm/include/CMSIS. Also in that folder are some cmsis_X.h files. You're probably using cmsis_ccs.h, but cmsis_gcc.h makes better reading.

    The function you're looking for is __enable_irq().