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
drivers/cc110x: Fix SPI communication on STM32F4 boards #9230
Conversation
I think I prefer this solution over variant 2, it's less intrusive. |
drivers/cc110x/cc110x-spi.c
Outdated
@@ -53,6 +53,10 @@ void cc110x_cs(cc110x_t *dev) | |||
/* Switch MISO/GDO1 to GPIO input mode */ | |||
#ifndef GPIO_READS_SPI_PINS | |||
gpio_init(dev->params.gdo1, GPIO_IN); | |||
#endif | |||
#ifdef CC110X_PARAM_GDO1_AF | |||
/* Reconfigure MISO/GDO1 to be used as regulare GPIO */ |
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.
s/regulare/regular/ ?
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.
Done :-)
The GDO1/MISO needs to be used as GPIO input in `cc110x_cs()`. On some boards, a call to `gpio_init_af()` is required. This commit allows to `#define` `CC110X_PARAM_GDO1_AF` to enable both the call to `gpio_init_af()` and set the value to pass to `gpio_int_af()`. If `CC110X_PARAM_GDO1_AF` is not defined in `board.h`, the behaviour remains unchanged.
This fixes communication issues with the CC1101 transceiver, as the board can now determine reliably when the transceiver is ready.
e2335ad
to
3070193
Compare
This is true. But on the other hand a user of |
In any case it seems to be good idea to add a warning to the documentation of |
This does not solve the problem :-( |
This PR implements the first variant of how to fix issue #9225. Please follow the discussion in the issue before merging, as there is an alternative way to fix the issue.