-
Notifications
You must be signed in to change notification settings - Fork 4
Cambios spi #6
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
base: main
Are you sure you want to change the base?
Cambios spi #6
Conversation
JorgePerC
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
También puedes checar este, para darte una idea
https://community.st.com/t5/stm32-mcus-embedded-software/cmsis-rtos2-i2c-read-write/td-p/737319
| SPI_HandleTypeDef* spiHandle; | ||
| GPIO_TypeDef* csPort; | ||
| uint16_t csPin; //esto directamente nose, pero venia en un ejemplo que vi | ||
| } SPI_Config; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No es tan necesario. porque en teoría ya está definido en el robot config
| uint16_t csPin; //esto directamente nose, pero venia en un ejemplo que vi | ||
| } SPI_Config; | ||
|
|
||
| SPI_Config SPI1_Config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Igual, no hay necesidad de inicializarla
| while (1) { | ||
|
|
||
| uint8_t command = 0x01; | ||
| uint8_t response = SPI_Transfer(&SPI1_Config, command); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increíble, jaja
Eso es más que nada para mandar, pero aún no has especificado el comando...
Pregúntale a Anita cuál es el comando que tienes que enviar para que el IMU te de datos
Igual, lo que más importa es la lectura
|
Se me estaba olvidando... |
revisa mis cambios porfa 7w7