Skip to content
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

CC2538 RF overlapping PIN usage #8779

Closed
AnonMall opened this issue Mar 14, 2018 · 2 comments
Closed

CC2538 RF overlapping PIN usage #8779

AnonMall opened this issue Mar 14, 2018 · 2 comments
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@AnonMall
Copy link

AnonMall commented Mar 14, 2018

Description

In the CC2538 RF initialization (cc2538_init() in cpu/cc2538/radio/cc2538_rf.c) the function uses some of the pins in order to observe the state of signals. For this it differentiates between the openmote-cc2538 and the cc2538dk board, but when used with a REMote-RevB for example, the pins interfere with the other pins needed for I²C.
Therefore using a REMote-RevB as a I²C Bus master additionally to the CC2538 radio transceiver causes problems.

Steps to reproduce the issue

Use a REMote-RevB as a I²C bus master while also adding the cc2538_rf module.

Expected results

Bus communication and 2.4 GHz communication functions without problem.

Actual results

I²C Bus communication fails and the CC2538 I²C code is not able to able to recover:
recover_i2c_bus(): Failed to release SDA after 200 SCL pulses

Versions

Solution

A solution was to was to add an other ifdef capsulation and differentiating between more boards. The code snippet in question is starting at line 99 in the mentioned file and is as follows:

/* Select output pins for the three observable signals */
#ifdef BOARD_OPENMOTE_CC2538
    CCTEST_OBSSEL0 = 0;                        /* PC0 = USB_SEL        */
    CCTEST_OBSSEL1 = 0;                        /* PC1 = N/C            */
    CCTEST_OBSSEL2 = 0;                        /* PC2 = N/C            */
    CCTEST_OBSSEL3 = 0;                        /* PC3 = USER_BUTTON    */
    CCTEST_OBSSEL4 = OBSSEL_EN | rfc_obs_sig0; /* PC4 = RED_LED        */
    CCTEST_OBSSEL5 = 0;                        /* PC5 = ORANGE_LED     */
    CCTEST_OBSSEL6 = OBSSEL_EN | rfc_obs_sig1; /* PC6 = YELLOW_LED     */
    CCTEST_OBSSEL7 = OBSSEL_EN | rfc_obs_sig2; /* PC7 = GREEN_LED      */
#else
    /* Assume BOARD_CC2538DK (or similar). */
    CCTEST_OBSSEL0 = OBSSEL_EN | rfc_obs_sig0; /* PC0 = LED_1 (red)    */
    CCTEST_OBSSEL1 = OBSSEL_EN | rfc_obs_sig1; /* PC1 = LED_2 (yellow) */
    CCTEST_OBSSEL2 = OBSSEL_EN | rfc_obs_sig2; /* PC2 = LED_3 (green)  */
    CCTEST_OBSSEL3 = 0;                        /* PC3 = LED_4 (red)    */
    CCTEST_OBSSEL4 = 0;                        /* PC4 = BTN_L          */
    CCTEST_OBSSEL5 = 0;                        /* PC5 = BTN_R          */
    CCTEST_OBSSEL6 = 0;                        /* PC6 = BTN_UP         */
    CCTEST_OBSSEL7 = 0;                       /* PC7 = BTN_DN         */
#endif

I would propose either to generalize it and offer the pins via the board configuration or to add more ifdef capsulations for other boards.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking Area: drivers Area: Device drivers labels Oct 17, 2018
@stale
Copy link

stale bot commented Aug 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Aug 10, 2019
@PeterKietzmann PeterKietzmann added the State: don't stale State: Tell state-bot to ignore this issue label Aug 19, 2019
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label Aug 19, 2019
@aabadie aabadie removed the State: don't stale State: Tell state-bot to ignore this issue label May 20, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
@maribu
Copy link
Member

maribu commented May 22, 2023

The driver allows now to configure the observable signals since e2c57cd

@maribu maribu closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

6 participants