Part Number: MSP432P401R
After some study of MSP432Ware 3.4_xx and experiments with timer_A0 interrupts that don't activate themselfs there must be reason
Example used below is not driverlib, it's a pure register level example using one timer and one interrupt.
// - - - - -
// Texas Instruments Inc.
// June 2016 (updated) | November 2013 (created)
// Built with CCSv6.1, IAR, Keil, GCC
//******************************************************************************
#include "msp.h"
int main(void) {
WDT_A->CTL = WDT_A_CTL_PW | // Stop WDT
WDT_A_CTL_HOLD;
// Configure GPIO
P1->DIR |= BIT0;
P1->OUT |= BIT0;
TIMER_A0->CCTL[0] = TIMER_A_CCTLN_CCIE; // TACCR0 interrupt enabled
TIMER_A0->CCR[0] = 50000;
TIMER_A0->CTL = TIMER_A_CTL_SSEL__SMCLK | // SMCLK, continuous mode
TIMER_A_CTL_MC__CONTINUOUS;
SCB->SCR |= SCB_SCR_SLEEPONEXIT_Msk; // Enable sleep on exit from ISR
__enable_interrupt();
NVIC->ISER[0] = 1 << ((TA0_0_IRQn) & 31);
while (1) {
__sleep();
__no_operation(); // For debugger
}
}
// Timer A0 interrupt service routine
void TA0_0_IRQHandler(void) {
TIMER_A0->CCTL[0] &= ~TIMER_A_CCTLN_CCIFG;
P1->OUT ^= BIT0;
TIMER_A0->CCR[0] += 50000; // Add Offset to TACCR0
}
This example A looks complete but really at CCS 6.1.3 these interrupts don't exist.
Now as the Cortex uses much presets, dependencies and modes, like the activating interrupts before they can be used,
does this mean each time or should this preset expected to be static as a default until it's released ?
Some other examples B use interrupts another way, they are really activated each time before they are used ?
while(1) {
MAP_GPIO_clearInterruptFlag(GPIO_PORT_P1, GPIO_PIN1 | GPIO_PIN4);
MAP_UART_enableInterrupt(EUSCI_A0_BASE, EUSCI_A_UART_RECEIVE_INTERRUPT);
MAP_Interrupt_enableInterrupt(INT_EUSCIA0);
MAP_Interrupt_enableInterrupt(INT_PORT1);
MAP_Interrupt_enableInterrupt(INT_TA1_0);
MAP_Interrupt_enableInterrupt(INT_TA2_0);
MAP_Interrupt_enableMaster();
MAP_PCM_gotoLPM0();
}
Now this another MSP432Ware 3.4_xx example B activates interupts as expected, but these two example principles A and B are now different so
the final question is are the MSP432WARE 3.40_xx Register level examples working or not ? Or is there some other
unknown reason behind this issue, tools,versions, libraries etc.
Actually MSP432 documentation doesn't very detailed describe above definition life-times if they really have run-time lifetime.
br