-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TCAN4550 development #46
base: master
Are you sure you want to change the base?
TCAN4550 development #46
Conversation
maksimdrachov
commented
Jun 26, 2024
•
edited
Loading
edited
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: `
} |