Closed MagSem closed 1 year ago
SPI doesn't restore after LP1 mode (WDT2_WakupFromLP1()).
If I use SPI-analog software command:
// SPI-compat for correct working LP Modes void WRITE_SPI_Analog(char b) { uint8_t i; for (i = 0; i < 8; i++) { GPIO_OutSet(GET_PIN_CFG(ADS1220_SCK)); // 1 asm volatile ("nop"); // 125 ns if (b & 0b10000000) GPIO_OutSet(GET_PIN_CFG(ADS1220_MOSI)); // 1 else GPIO_OutClr(GET_PIN_CFG(ADS1220_MOSI)); // 0 b <<= 1; GPIO_OutClr(GET_PIN_CFG(ADS1220_SCK)); // 0 asm volatile ("nop"); // 125 ns } }
all working.
arduino-max326xx repo has been archived and is now read only.
SPI doesn't restore after LP1 mode (WDT2_WakupFromLP1()).
If I use SPI-analog software command:
// SPI-compat for correct working LP Modes void WRITE_SPI_Analog(char b) { uint8_t i; for (i = 0; i < 8; i++) { GPIO_OutSet(GET_PIN_CFG(ADS1220_SCK)); // 1 asm volatile ("nop"); // 125 ns if (b & 0b10000000) GPIO_OutSet(GET_PIN_CFG(ADS1220_MOSI)); // 1 else GPIO_OutClr(GET_PIN_CFG(ADS1220_MOSI)); // 0 b <<= 1; GPIO_OutClr(GET_PIN_CFG(ADS1220_SCK)); // 0 asm volatile ("nop"); // 125 ns } }
all working.