-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
px4_fmuv4:Add Runtime SPI4 #11301
px4_fmuv4:Add Runtime SPI4 #11301
Conversation
src/drivers/pmw3901/pmw3901.cpp
Outdated
// #error "add the required spi dev from board_config.h here" | ||
// #endif | ||
|
||
#define PMW3901_BUS PX4_SPI_BUS_EXTERNAL |
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.
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.
@dagar - thank you the is cloned here.
5d170c0
to
a2f5277
Compare
@DanielePettenuzzo @dagar - run time detections is ready to test. When a ESP2866 is plugged in it should work and have no activity on When wired as described here and 3 - GOIO2 to GND SPI4 attached devices should work. |
The build is built with SPI4. At run time the signal GPIO_8266_GPIO2 it tested. If it is low the SPI4 is configred. if it is high SPI4 is not configured. We still need a call out in the driver start to test if the bus should be used. I.E manifest.
a2f5277
to
da8eb74
Compare
* | ||
************************************************************************************/ | ||
|
||
enum board_bus_types { |
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.
This looks good for now, but ultimately I'd like to see if we can unify this with Device (https://github.com/PX4/Firmware/blob/master/src/lib/drivers/device/Device.hpp) where we already have a notion of bus type.
@dagar, @DanielePettenuzzo - Ready for test.
The build is built with SPI4. At run time the signal
GPIO_8266_GPIO2 it tested. If it is low the SPI4 is configured.
if it is high SPI4 is not configured.
@dagar - The mods to use the ESP module and SPI4. I would suggest making a cable to Y VDD3v3_PERIH and GND to both devices. The key here is to isolate ESP 8266 6, 5, 4, and 3 from FMU connector.
Mods
Wire FMU connector to SPI device:
1 - SPI device GND
3 - GOIO2 to GND - Signals board to enable SPI4 on this connector.
6 - SPI device MOSI
5 - SPI device CLK
4 - SPI device MSIO
8 - SPI device VDD3V3
10 - SPI device Chip Select
On ESP 8266
3 - Leave not connected.
On the ESP 8266 Connect pins 8 to 6 and 4 together.
Wire FMU connector to ESP 8266 :
1 - ESP 8266 Pin 1 GND
2 - ESP 8266 Pin 2 TxD
7 - ESP 8266 Pin 7 RxD
8 - ESP 8266 Pin 8 VDD3V3
10 - SPI device Chip Select
You must Isolate ESP 8266 6, 5, 4 and 3, from FMU connector.