analogdevicesinc / arduino-max326xx

Arduino core for Maxim's MAX326xx series boards
Other
0 stars 0 forks source link

SPI doesn't restore after LP1 mode (WDT2_WakupFromLP1()) #8

Closed MagSem closed 1 year ago

MagSem commented 5 years 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.

jessexm commented 1 year ago

arduino-max326xx repo has been archived and is now read only.