gptimer_open has a bug

This commit is contained in:
YiChin
2019-09-26 14:46:52 +08:00
parent 53ed3f7d6c
commit 4d3129782e
3 changed files with 15 additions and 10 deletions
@@ -12,10 +12,7 @@
static GPTimerCC26XX_Handle gptimer_handle;
static void elite_gptimer_callback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask) {
// flag_notify(EVT_PERIODIC_GPTIMER);
Semaphore_post(semaphore);
}
static void elite_gptimer_callback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask);
#define elite_gptimer_start() GPTimerCC26XX_start(gptimer_handle)
#define elite_gptimer_stop() GPTimerCC26XX_stop(gptimer_handle)
@@ -28,9 +28,15 @@ static void SimpleBLEPeripheral_clockHandler(UArg arg) {
// Wake up the application.
// Semaphore_post(semaphore); // send samaphore to jump out of infinite waiting(simple_peripheral.c line570)
}
static void elite_gptimer_callback(GPTimerCC26XX_Handle handle, GPTimerCC26XX_IntMask interruptMask) {
// flag_notify(EVT_PERIODIC_GPTIMER);
// Semaphore_post(semaphore);
LED_color(DARKLED, 0xFF, 0x00, 0x00);
}
static void ZM_update_instruction_callback(uint8_t ins_type, uint8_t chip_ID, uint8_t *ins);
static void ZM_init() {
@@ -47,10 +53,7 @@ static void ZM_init() {
InitEliteInstruction();
InitCurrentUserCode();
elite_gptimer_open();
// init DAC, set output ~= 0 V
DAC_outputV(Usercode_Correction_to_DAC(24999));
// elite_gptimer_open();
// PIN_registerIntCb(pin_handle, switch_on_callback);
// PIN_setInterrupt(pin_handle, switch_on | PIN_IRQ_POSEDGE);
@@ -547,8 +547,8 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
SimpleBLEPeripheral_init();
headstage_init_device_info();
Elite_SPI_init();
ZM_init();
Elite_SPI_init();
uint8_t key = 0;
uint8_t counter6994 = 0;
@@ -556,10 +556,15 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
// Util_constructClock(&periodicClock, SimpleBLEPeripheral_clockHandler, SBP_PERIODIC_EVT_PERIOD, 0, false, SBP_PERIODIC_EVT); // create a clock clockduration = 42(~=0.01 sec)
// Util_startClock(&periodicClock); // start the clock, timeup => call SimpleBLEPeripheral_clockHandler => wake up the device
elite_gptimer_start();
// init DAC, set output ~= 0 V
DAC_outputV(Usercode_Correction_to_DAC(24999));
PIN_setOutputValue(pin_handle, enable_5v, 1); // enable 5V
TurnOn10V();
LEDPowerON();
// elite_gptimer_start();
// Application main loops
for (;;) {
// Waits for a signal to the semaphore associated with the calling thread.