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.
Part Number: MSP432P401R
Tool/software: Code Composer Studio
Hello,
I'm attempting to re-use some code I wrote about a year ago for the MSP432. Unfortunately, the wrapper code I've written for dealing with the clocking no longer seems to work.
In the simple delay function, entering the loop seems to trigger the faultISR. If I change the mapped function to MAP_PCM_gotoLPM0InterruptSafe to MAP_PCM_gotoLPM0 then the below ISR is triggered but interrupts are missed when the parameter for the delay is too low.
I've copied the relevant material below; can anyone offer any assistance?
Thanks very much in advance,
Séan
#include "clocking.h" #include "driverlib.h" static volatile bool waitT32 = true; void clocking_setup(void){ // Operate MCLK at 24MHz MAP_CS_initClockSignal(CS_MCLK, CS_MODOSC_SELECT, CS_CLOCK_DIVIDER_1); // Operate SMCLK at 12MHz MAP_CS_initClockSignal(CS_SMCLK, CS_MODOSC_SELECT, CS_CLOCK_DIVIDER_2); timer32_setup(); } void timer32_setup(void){ MAP_Timer32_initModule(TIMER32_0_BASE, TIMER32_PRESCALER_16, TIMER32_32BIT, TIMER32_PERIODIC_MODE); MAP_Timer32_enableInterrupt(TIMER32_0_BASE); MAP_Timer32_clearInterruptFlag((uint32_t)TIMER32_0_BASE); MAP_Interrupt_enableInterrupt(INT_T32_INT1); } void timer32_delay(uint32_t msDelay){ uint64_t sDelay = 1500*msDelay; if(sDelay > UINT32_MAX) // Prevent overflow; best effort timer sDelay = UINT32_MAX; MAP_Timer32_setCount((uint32_t)TIMER32_0_BASE, (uint32_t)sDelay); waitT32 = true; MAP_Timer32_startTimer(TIMER32_0_BASE, true); while(waitT32){ // Ignore other interrupts on the processor end MAP_PCM_gotoLPM0InterruptSafe(); } } void timer32_isr(void){ MAP_Timer32_clearInterruptFlag(TIMER32_0_BASE); waitT32 = false; }
EDIT: Using Code Composer v6.2.0.00050 and a Linux Debian distro, if either fact is relevant.
Hi Chris,
Thanks for the reply.
I have updated CCS but the silicon will likely be an older revision, Revision B I believe. In fact, remembering off-hand, the IDE does offer a warning about the usage of 'pre-production silicon'.
If this is indeed the source of the problem, is it possible for me to remove certain updates in order to work with the silicon I currently hold? Or is there an alternative solution?
Thanks,
Séan
**Attention** This is a public forum