Other Parts Discussed in Thread: BLE-STACK, SYSBIOS
Tool/software: TI-RTOS
Hi all,
I imported the simple_peripheral example for the cc2640r2 Launchpad and added a new Task.
In this Task I want to test the Flash on the Launchpad using the ExtFlash.c/h files from the oad_offchip example. I copied the two ExtFlash files to the Application folder of my project.
That works..
The moment I register a Timer Interrupt, the Flash test will hang at "SemaphoreP_pend(&(object->transferComplete)" [File: SPICC26XXDMA.c Funktion: SPICC26XXDMA_transfer (line 864)]
Here is my code:
#include "ExtFlash.h"
#include <driverlib/timer.h>
#include <ti/sysbios/knl/Task.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26XX.h>
#define TASK_STACK_SIZE 512
#define OWN_TASK_PRIORITY 1
Task_Struct task0Struct;
Char task0Stack[TASK_STACK_SIZE];
void timer0_ISR(void);
void own_Application_Task_Fxn(UArg arg0, UArg arg1);
void own_Application_Task_Init(void)
{
Task_Params taskParams;
/* Construct Task thread */
Task_Params_init(&taskParams);
taskParams.stackSize = TASK_STACK_SIZE;
taskParams.priority = OWN_TASK_PRIORITY;
taskParams.stack = &task0Stack;
Task_construct(&task0Struct, (Task_FuncPtr)own_Application_Task_Fxn, &taskParams, NULL);
}
void timer0_ISR(void){
}
void own_Application_Task_Fxn(UArg arg0, UArg arg1)
{
Power_setDependency(PowerCC26XX_PERIPH_GPT0);
TimerDisable(GPT0_BASE, TIMER_A);
TimerConfigure(GPT0_BASE, TIMER_CFG_PERIODIC_UP);
TimerLoadSet(GPT0_BASE, TIMER_A, 4800000);
TimerStallControl(GPT0_BASE, TIMER_A, false);
TimerIntRegister(GPT0_BASE, TIMER_A, timer0_ISR);
TimerIntUnregister(GPT0_BASE, TIMER_A);
// TimerIntClear(GPT0_BASE, TIMER_TIMA_TIMEOUT | TIMER_CAPA_MATCH | TIMER_CAPA_EVENT);
// TimerIntEnable(GPT0_BASE, TIMER_TIMA_TIMEOUT);
Power_releaseDependency(PowerCC26XX_PERIPH_GPT0);
while(1)
{
ExtFlash_test();
Task_sleep(30000);
}
}
Even though I don't even use the Timer and immediately unregister the Timer Interrupt, it doesn't work... Without the registration of the Timer Interrupt, the Flash Test works as expected...
Any Idea, why? ;)
I forgot to mention: I'm using
- CCS 7.2.0.00013
- BLE-Stack 2.02.01.18
Thanks for your help,
Micha