P0.11 핀 활성화: ADA2200(Lock-in Amp.) 전원 공급(LDO)
- Flash Memory(W25Q31) 전용으로 보고 IR 제어 비활성화 -> GPIO 제어 가능하도록 복원
This commit is contained in:
@@ -342,7 +342,7 @@ int main(void)
|
||||
|
||||
LOG_PRINTF("\r\n\r\n");
|
||||
LOG_PRINTF("========================================\r\n");
|
||||
LOG_PRINTF(" vivaMayo UART OK\r\n");
|
||||
LOG_PRINTF(" VivaMayo UART OK\r\n");
|
||||
LOG_PRINTF("========================================\r\n");
|
||||
|
||||
#if DEBUG_MINIMAL_BOOT
|
||||
|
||||
@@ -32,6 +32,7 @@ APP_TIMER_DEF(m_w25q_test_timer_id);
|
||||
|
||||
#define POWER_LOOP_INTERVAL 30
|
||||
static uint8_t p_order;
|
||||
static volatile bool power_up_done = false;
|
||||
extern uint8_t simple_samples_in_buffer;
|
||||
extern volatile bool processing;
|
||||
bool lock_check = false;
|
||||
@@ -45,8 +46,14 @@ void power_gpio_init(void)
|
||||
|
||||
void ir_power_control(on_off_cont_t ir_power_st)
|
||||
{
|
||||
/* Removed: P0.11 now W25Q32 power, IR power control no longer available */
|
||||
(void)ir_power_st;
|
||||
/* P0.11 = PWR_I/R_EN = U6 LDO EN (+3.3V_R for ADA2200)
|
||||
* Shared with W25Q32 power (W25Q_PWR_PIN2) - both need HIGH */
|
||||
nrf_gpio_cfg_output(NRF_GPIO_PIN_MAP(0, 11));
|
||||
if (ir_power_st == OFF) {
|
||||
nrf_gpio_pin_clear(NRF_GPIO_PIN_MAP(0, 11));
|
||||
} else if (ir_power_st == ON) {
|
||||
nrf_gpio_pin_set(NRF_GPIO_PIN_MAP(0, 11));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,9 +106,12 @@ int device_sleep_mode(void){
|
||||
}
|
||||
|
||||
|
||||
bool is_power_up_done(void) { return power_up_done; }
|
||||
|
||||
int device_activated(void){
|
||||
int rc = 0;
|
||||
p_order = 0;
|
||||
power_up_done = false;
|
||||
lock_check =true;
|
||||
power_timer_start();
|
||||
eeprom_control(OFF);
|
||||
@@ -249,6 +259,7 @@ void power_loop(void *p_context)
|
||||
p_order++;
|
||||
power_timer_start();
|
||||
} else {
|
||||
power_up_done = true;
|
||||
DBG_PRINTF("[PWR] Device Activated OK!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ void rcv_power_control(on_off_cont_t rcv_power_st);
|
||||
void eeprom_control(on_off_cont_t rcv_power_st);
|
||||
int device_sleep_mode(void);
|
||||
int device_activated(void);
|
||||
bool is_power_up_done(void);
|
||||
int device_reactivated(void);
|
||||
void power_loop(void * p_context); /* For x ms */
|
||||
void power_timer_start(void);
|
||||
|
||||
Reference in New Issue
Block a user