i got 1khz spi slave working! (SPISettings(1000),MSBFIRST,SPI_MODE0)
i am also using this to reinitialize the slave when the host resets via teensyX.reset();, slave runs this switch case code
added all function status update of slave to master library, user will know (via a bool) any statuses of the slave
Ex. if the slave was reset and the master was not aware of it, during the next transfer the slave will update the caller of it, this gives the user to re-run his slave's initialization code (if any). you could always hard code the values in the slave, but for remote purposes this can be useful (example, the slave resets, so it's spi slave cs pins are no longer output, or custom baud rates, master would catch that it went offline and re-set the pin back to output and just let the user code run it's normal course. I try to design it around hot plugability and self-recovery, the master already knows the slave status, ill have to write a function perhaps that the user would call to reset the status flag after he re-runs his init code
as it stands now, spisettings of 1000 to 24 000 000 run at stock speeds without any serial errors seen, so this is good news
i am also using this to reinitialize the slave when the host resets via teensyX.reset();, slave runs this switch case code
Code:
if ( spi_data[1] == 0xFF0A ) ((*(volatile uint32_t *)0xE000ED0C) = (0x5FA0004));
added all function status update of slave to master library, user will know (via a bool) any statuses of the slave
Ex. if the slave was reset and the master was not aware of it, during the next transfer the slave will update the caller of it, this gives the user to re-run his slave's initialization code (if any). you could always hard code the values in the slave, but for remote purposes this can be useful (example, the slave resets, so it's spi slave cs pins are no longer output, or custom baud rates, master would catch that it went offline and re-set the pin back to output and just let the user code run it's normal course. I try to design it around hot plugability and self-recovery, the master already knows the slave status, ill have to write a function perhaps that the user would call to reset the status flag after he re-runs his init code
as it stands now, spisettings of 1000 to 24 000 000 run at stock speeds without any serial errors seen, so this is good news