Part Number: CC2642R
Tool/software: Code Composer Studio
Hello,
I opened the uartecho example from simplelink_cc13x2_26x2_sdk_4_20_00_35 and modified it. The code is presented below:
#include <stdint.h>
#include <stddef.h>
/* Driver Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/UART.h>
#include <ti/sysbios/knl/Event.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/BIOS.h>
/* Driver configuration */
#include "ti_drivers_config.h"
Event_Handle Event_H;
#define TIMER_RELEASE Event_Id_03
void clock_cb ();
/*
* ======== mainThread ========
*/
void *mainThread(void *arg0)
{
Event_H = Event_create(NULL, NULL);
Clock_Handle clock;
Clock_Params clockParams;
Clock_Params_init(&clockParams);
//clockParams.period = 1000000;
clockParams.startFlag = 0;
clock = Clock_create((Clock_FuncPtr) &clock_cb,
(100000), &clockParams, NULL);
Clock_start(clock);
uint16_t events=0;
/* Loop forever echoing */
while (1)
{
events = Event_pend(Event_H, Event_Id_NONE, 0xFFFFFFFF, BIOS_WAIT_FOREVER);
if (events & TIMER_RELEASE)
{
Clock_start(clock);
}
}
}
void clock_cb ()
{
Event_post(Event_H, TIMER_RELEASE);
}
My code has a clock that should post an event every second. I am facing the following problem. If I use identifiers for events Event_Id_16 and higher, then the Event_pend () function does not work. If I use identifiers from Event_Id_00 to Event_Id_15, then the function is triggered and the clock is restarted.
It turns out that all events whose identifier exceeds 2 bytes cannot be received by the Event_pend () function? What could be the problem? I want to use all available event IDs.
Best regards, Maxim