fix: 1. upon startup, the state of all electrodes is highZ (the control of GPIOs follows a specific order)
2. the state is idle before starting and after finishing the pulse generation
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
|
||||
#define VERSION_DATE_YEAR 24
|
||||
#define VERSION_DATE_MONTH 8
|
||||
#define VERSION_DATE_DAY 22
|
||||
#define VERSION_DATE_HOUR 10
|
||||
#define VERSION_DATE_MINUTE 54
|
||||
#define VERSION_DATE_DAY 29
|
||||
#define VERSION_DATE_HOUR 9
|
||||
#define VERSION_DATE_MINUTE 56
|
||||
static void cis_version(uint8_t *ins, uint16_t size)
|
||||
{
|
||||
NRF_LOG_INFO("%s", __FUNCTION__);
|
||||
|
||||
+25
-13
@@ -199,6 +199,14 @@ void cpg11_pulse_init(uint32_t hw_idx, pusle_gen_t *p_pusle_gen, uint32_t len)
|
||||
pusle_gen_hw[hw_idx].pusle_gen_len = len;
|
||||
pusle_gen_hw[hw_idx].pusle_gen_sel = 0;
|
||||
|
||||
for (uint32_t i = 0; i < len; i++)
|
||||
{
|
||||
nrf_gpio_pin_clear(p_pusle_gen[i].VBxL);
|
||||
nrf_gpio_pin_set(p_pusle_gen[i].VBxH);
|
||||
nrf_gpio_pin_clear(p_pusle_gen[i].VAxL);
|
||||
nrf_gpio_pin_set(p_pusle_gen[i].VAxH);
|
||||
}
|
||||
|
||||
taskEXIT_CRITICAL();
|
||||
};
|
||||
|
||||
@@ -323,15 +331,7 @@ void cpg11_io_init(void)
|
||||
LED_R_PIN,
|
||||
LED_G_PIN,
|
||||
LED_B_PIN,
|
||||
CS_MEM_PIN,
|
||||
VA1H_PIN,
|
||||
VB1H_PIN,
|
||||
VA2H_PIN,
|
||||
VB2H_PIN,
|
||||
VA3H_PIN,
|
||||
VB3H_PIN,
|
||||
VA4H_PIN,
|
||||
VB4H_PIN,
|
||||
CS_MEM_PIN
|
||||
};
|
||||
|
||||
const uint32_t pel_pins_default_low[] = {
|
||||
@@ -352,14 +352,26 @@ void cpg11_io_init(void)
|
||||
ADPT1_S3_PIN,
|
||||
ADPT1_S2_PIN,
|
||||
ADPT1_S1_PIN,
|
||||
VA1L_PIN,
|
||||
|
||||
VB1L_PIN,
|
||||
VA2L_PIN,
|
||||
VB1H_PIN,
|
||||
VA1L_PIN,
|
||||
VA1H_PIN,
|
||||
|
||||
VB2L_PIN,
|
||||
VA3L_PIN,
|
||||
VB2H_PIN,
|
||||
VA2L_PIN,
|
||||
VA2H_PIN,
|
||||
|
||||
VB3L_PIN,
|
||||
VB3H_PIN,
|
||||
VA3L_PIN,
|
||||
VA3H_PIN,
|
||||
|
||||
VB4L_PIN,
|
||||
VB4H_PIN,
|
||||
VA4L_PIN,
|
||||
VB4L_PIN
|
||||
VA4H_PIN,
|
||||
};
|
||||
|
||||
for (int i = 0; i < COUNTOF(pel_pins_default_high); i++)
|
||||
|
||||
Reference in New Issue
Block a user