Commit 64e22203 authored by natsfr's avatar natsfr

adding delay BEFORE reset seems to correct errors

parent 63705349
This diff is collapsed.
......@@ -103,6 +103,8 @@ void spi_CS(uint8_t enable) {
void initSi446x() {
initSiTimer();
GPIO_ResetBits(GPIOB, SI_SHDN);
tim1Wait(60000);
GPIO_SetBits(GPIOB, SI_SHDN);
tim1Wait(60000);
GPIO_ResetBits(GPIOB, SI_SHDN);
......@@ -216,10 +218,11 @@ void check_part_info() {
si44_spisend(PART_INFO);
spi_CS(0);
spi_CS(1);
while(si44_getcts() != 0xFF);
spi_CS(0);
// while(!GPIO_ReadInputDataBit(GPIOA, SI_CTS));
// spi_CS(1);
// while(si44_getcts() != 0xFF);
// spi_CS(0);
tim1Wait(1000);
while(!GPIO_ReadInputDataBit(GPIOA, SI_CTS));
uint8_t part_info[9];
spi_CS(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment