SENS_SPI_FRAMING_ERROR & SENS_SPI_PARITY_ERROR When write data into SETTINGS2(0x0019) register #46
Unanswered
wish029517
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
Hi @wish029517,
maybe this already helps. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
The version of library is 2.2.0,and the type of hardware is Arduino MEGA 2560. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to set AS5047D SETTINGS2(0x0019) register like the following command:
UVWPP : 011 (4 of pole pairs)
HYS: 00
ABIRES: 000
When I write 0x0003 into the register,I got "SENS_SPI_FRAMING_ERROR" 、 "SENS_SPI_PARITY_ERROR" and "CONT_SPI_PARITY_ERROR",
but according to even parity,I think it is not wrong.
This is my code:
auto settingsSETTINGS1 = new AS5047P_Types::SETTINGS1_t();
auto settingsSETTINGS2 = new AS5047P_Types::SETTINGS2_t();
// initialize a new object which represents error information
auto errorInfo = AS5047P_Types::ERROR_t();
// set the raw register value
settingsSETTINGS1->data.raw = 0x0088;
settingsSETTINGS2->data.raw = 0x0003;
// write the settings 1、2 register to the sensor
bool SETTINGS1_result = as5047p.write_SETTINGS1(settingsSETTINGS1, &errorInfo, true, true);
bool SETTINGS2_result = as5047p.write_SETTINGS2(settingsSETTINGS2, &errorInfo, true, true);
Thank you very much for help!
Beta Was this translation helpful? Give feedback.
All reactions