Conversation
|
In the provided driver, SPI write and read functions are exclusive for a specific MCU. Currently it is being tested with ESP32 WROOM-32. When implementing the write functions, an anomaly appeared. The values in the TX buffer of the write function have been hardcoded for testing purposes. Surprisingly, whenever the spiRegisterRead() function is called (fully tested and functional) before the values have been written by spiRegisterWrite(), values seem to be already in the register (register for read/write tests: 0x0808 of TCAN4550). Below is the read/write and init functions: ` } uint8_t spiRegisterWrite(uint16_t reg_addr, uint32_t reg_value, uint32_t * pointer) { } uint32_t spiRegisterRead(uint16_t reg_addr) { } ` This is the way functions were called: ` ` |
|
Issue seems to have been resolved. Steps taken:
Updated code: ` } |
Uh oh!
There was an error while loading. Please reload this page.