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: TI-RTOS
Hey, Guys
I Have problem with MSP432 Launchboard
first of all,
I created (imported) with empty_MSP_EXP432P401R_nortos_ccs project from Resource View.
then,
I started making application kind of temperature sensor.
the process is simple
1) boot -> 2) adc data (temperature) -> 3) record to sd card -> 4) deep sleep or shut down mode -> 5) awake & repreat
even if I started with no-rtos , I need sd-card function ( I realize fatfs is only including in TI-RTOS )
So, I added TI-RTOS setting into the project
header include, dependency include.. blahblah
After long time, I did run it.
Everything is ok so far.
However, problem is that Interrunpt Service routines(ISR) are never called.
Naturally, It works fine with eliminating TI-RTOS setting.
Here is TI-RTOS setting that i added
1) project setting
2) modify .cmd file ( .intvecs & .resetVect )
3) add interrupt keyword to IRQ function (picture above)
Somen help me plz.
Hello,
I believe that for this case, it would be simpler just to add the fatfs (library or source code) into your project (without RTOS). And the main reason why your PORT interrupt is not working is because TI-RTOS is taking control of all the interrupts (HWI's).
Having said that I can help you with either case; using or not using RTOS, but first I just need to understand which case will work better for you, at the end of day you know your application better than I do.
Best regards,
David
Hello,
Based on your response from this post, you picked TI-RTOS, therefore please do the following:
1. Start with the fatsdraw example (brand new).
2. Using the gpiointerrupt example as reference, do the following in your fatsdraw project:
/* Turn on user LED */ GPIO_write(Board_GPIO_LED0, Board_GPIO_LED_ON); /* install Button callback */ GPIO_setCallback(Board_GPIO_BUTTON0, gpioButtonFxn0); /* Enable interrupts */ GPIO_enableInt(Board_GPIO_BUTTON0);
/* * ======== gpioButtonFxn0 ======== * Callback function for the GPIO interrupt on Board_GPIO_BUTTON0. */ void gpioButtonFxn0(uint_least8_t index) { /* Clear the GPIO interrupt and toggle an LED */ GPIO_toggle(Board_GPIO_LED0); }
For more information, please take a look at this SimpleLink Academy training - Learn how to setup GPIO interrupts using TI Drivers with the SimpleLink SDK
3. Now the only thing missing is to enable the deep sleep mode, and I will use I'll use the powersleep example as reference:
GPIO_setCallback(Board_GPIO_BUTTON1, gpioButtonFxn1); GPIO_enableInt(Board_GPIO_BUTTON1);
void gpioButtonFxn1(uint_least8_t x) { GPIO_clearInt(Board_GPIO_BUTTON1); /* Put all GPIOs in lowest power configuration. This is done by MSP432 specific driverlib accesses*/ MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PA, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PB, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PC, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PD, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PE, PIN_ALL16); MAP_GPIO_setOutputLowOnPin(GPIO_PORT_PJ, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PA, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PB, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PC, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PD, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PE, PIN_ALL16); MAP_GPIO_setAsOutputPin(GPIO_PORT_PJ, PIN_ALL16); /* Turn off PSS high-side supervisors to consume lower power after deep sleep */ MAP_PSS_disableHighSide(); /* Select PowerMSP432_deepSleepPolicy to enable transition * into the PowerMSP432_DEEPSLEEP_1 (LPM4)state */ Power_setPolicy((Power_PolicyFxn)PowerMSP432_deepSleepPolicy); /* Refer to Device datasheet for Wake-up Sources From Low Power Modes to wake up from * PowerMSP432_DEEPSLEEP_1 */ }
You may also want to take a look at this other SimpleLink Academy Training - A simple Thermostat example which introduces multi-threading using the POSIX API calls because you may want to add more threads to your system.
Hopefully this helps.
David
**Attention** This is a public forum