You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/21 05:37:21 UTC

[GitHub] [incubator-nuttx] robertlipe commented on issue #5810: GPIO issues on BL602 + suggestions for RISC-V, maybe more.

robertlipe commented on issue #5810:
URL: https://github.com/apache/incubator-nuttx/issues/5810#issuecomment-1073502477


   This is almost certainly the reason why.  You hit exactly the largest
   configuration that would work without crashing into this by using exactly
   one of  each of {IN, OUT, INTR}. The second on any of those would have
   never been connected.
   
   With this change, you should be able to hook up that Reset line on GPIO18.
   One of the changes I edited away was about identical to your case; I needed
   a second output.
   
   diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c
   b/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c
   index be0aa35228..51cc63e5b5 100644
   --- a/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c
   +++ b/boards/risc-v/bl602/bl602evb/src/bl602_gpio.c
   @@ -120,6 +120,7 @@ static struct bl602_gpio_dev_s g_gpin[BOARD_NGPIOIN];
    static const uint32_t g_gpiooutputs[BOARD_NGPIOOUT] =
    {
      BOARD_GPIO_OUT1,
   +  BOARD_GPIO_OUT2,
    };
   
   That'll actually add an instance and dev node for /dev/gpioout2 and connect
   it through the indirection. Then in your board.h,add something like:
   
   #define BOARD_GPIO_OUT2   (GPIO_OUTPUT | GPIO_PULLUP | \
                               GPIO_FUNC_SWGPIO | GPIO_PIN18)
   
   
   These patches should come very close to applying for you because I forked
   your nuttx tree and not master. :-)
   
   
   On Sun, Mar 20, 2022 at 11:06 PM Lee Lup Yuen ***@***.***>
   wrote:
   
   > Thanks for posting this! I wanted to use Multiple GPIO Outputs for Semtech
   > SX1262 LoRa Transceiver
   > <https://lupyuen.github.io/articles/sx1262#connect-sx1262-transceiver> on
   > BL602, but I couldn't figure out. Hope we can work out a solution for this.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-nuttx/issues/5810#issuecomment-1073464882>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ACCSD342IEIK4ESCDMNTHTLVA7YTLANCNFSM5RGMP4IQ>
   > .
   > Triage notifications on the go with GitHub Mobile for iOS
   > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
   > or Android
   > <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
   >
   > You are receiving this because you authored the thread.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org