Skip to content

Commit

Permalink
lib/core: Fix power disable process for ADCS
Browse files Browse the repository at this point in the history
Fixes an issue where disabling the power control for ADCS was not
working correctly. This issue had been resolved on the MAIN board
in the following commit but had not been deployed to ADCS.

  commit f97719a
    hwtest/main: Fix Power disable not working

Signed-off-by: Takuya Sasaki <takuya.sasaki@spacecubics.com>
  • Loading branch information
sasataku committed Nov 25, 2024
1 parent f4b8315 commit 2d1ee8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/core/pwrctrl_adcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ void sc_adcs_power_enable(uint8_t target_bit)

void sc_adcs_power_disable(uint8_t target_bit)
{
sys_clear_bits(SCADCS_ADCS_BASE_ADDR + SCADCS_PCR_OFFSET, SCADCS_PCR_KEYCODE | target_bit);
uint32_t val = sys_read32(SCADCS_ADCS_BASE_ADDR + SCADCS_PCR_OFFSET);

val = SCADCS_PCR_KEYCODE | (val & ~target_bit);
sys_write32(val, SCADCS_ADCS_BASE_ADDR + SCADCS_PCR_OFFSET);
}

void sc_adcs_imu_reset(void)
Expand Down

0 comments on commit 2d1ee8b

Please sign in to comment.