Questions on using NXP S32K144 with nrF52840 for bluetooth communication

Hello Team, 

I have  board that I have build using NXPS32K144 and nRF52840 module. I am trying to communicate between the MCU and nRF52840 module via SPI. I would like to know the following:

1. Can you help me with the C library and example to enable me getting kick started with this project.

2. At the beginning I would like turn on an LED that I have connected via GPIO point of the nRF52840 module. Any sample codes for this please? 

3. Eventually, I would like to enable the Bluetooth communication between two boards that use the above MCU and 52840 modules and communicate. Do you have any sample codes for that? 

Your help is greatly appreciated. 

Looking forward to your response. 

Regards

Surya

Parents Reply Children
  • Zephyr is an unweildly beast  of ~ 5GB worth of boards, configuration files, overlays etc. There's no such thing as a drop and drop into S32 (like you can do with the SDKs you download off NXP's website). You need to clone a git repository and configure it manually. Nrf went with Nrf Connect in order for the customers to be able to get a board up and running in less than 30 minutes. I betcha that if you try building zephyr from sources yourself, it's gonna take you more than that (understatement). On another note, nrf does not support anything other than Visual Code and their extension for it.

    On the plus side, your NXP MCU could very well be an USB TTL or NASA's supercomuter, the 52840 does not know, nor does it care who it talks to. So I would propose the following (easy and quick) solution for you:

    Keep using S32 for your NXP target. Download visual code and install it, as per  instructions. Before diving into connectivity with NXP, wire a loopback SPI example. That is, set two spi instances on the same nrf board, connect the pins via jumper cables and get the comms up and running. After that, hook the jumpers to the NXP target.

    hal_nordic/nrfx/samples/src/nrfx_spim/blocking at 140140ea047f441fe076d26f79eb54dc9a38bcb6 · zephyrproject-rtos/hal_nordic (github.com)

    hal_nordic/nrfx/samples/src/nrfx_spim/non_blocking at 140140ea047f441fe076d26f79eb54dc9a38bcb6 · zephyrproject-rtos/hal_nordic (github.com) The DMA version.

    Anyway, back to the main point, and I can't stress this enough, get Visual Code. After you're comfortable with Zephyr and you actually get what's underneath the hood, well, you're free to use any IDE you wish. I, for example, use CLion for everything embedded (including NXP, via CMake). But trust me, I spent hoooooooours getting everything to work just right. And I'm not that much of a beginner in the field. It won't take you more than a week to familiarize yourself with Zephyr and the nrf connect, at least at the most basic of levels.

    As a personal note (and it's just my two cents, so please don't take this the wrong way), while the Nordic team is probably the friendliest and most helpful you're ever likely to interact with, this is not an arduino forum. You're going to get pointers, but asking stuff like "hey, how can I blink a led" usually won't net you a copy-paste ready piece of code. I mean, this is a customer support forum, not a public school.

    Kindly check the links provided and take those as a starting point.

    Regards.

  • Perfect. Thank you. I will try it out and keep you posted. 

    Regards

    Surya

  •  Once again I agree with  . Getting started with Zephyr RTOS and nRF Connect SDK can, and most likely will, be overwhelming for a beginner/someone with experience with Arduino or even nRF5 SDK or other SDKs since NCS is so comprehensive. Luckily the guides and documentation we provide is something that we're using a lot of time to improve and they get better for every day.

    I recommend that you subscribe to the academy pages and you will be updated when new courses come. I know that the NCS fundamentals intermediate course is in the making and will be a continuation of the NCS fundamentals beginner course. The intermediate course will contain some lessons regarding how to use various peripherals such as the SPI in NCS

    I also recommend that you use the Zephyr forums which you will find on their Discord channel. Some of the drivers and samples are contributions from the Open source community and you might find people with more experience with those specifics on that forum instead of here on Devzone, but please use Devzone as much as you want. If we believe you will find better help elsewhere on certain topics we will point you where to go

    See https://zephyrproject.org/community/ for a link to their Discord

     

    pauleffect said:
    As a personal note (and it's just my two cents, so please don't take this the wrong way), while the Nordic team is probably the friendliest and most helpful you're ever likely to interact with, this is not an arduino forum. You're going to get pointers, but asking stuff like "hey, how can I blink a led" usually won't net you a copy-paste ready piece of code. I mean, this is a customer support forum, not a public school.

    Hahah, I see you may have had some mixed experience on the forum Laughing But yeah, you're right here as well. Learning by doing is important and the samples we typically provide to showcase how to for instance blink a led does typically include more than the absolute bare minimum to do so. In some cases you may find that some of the engineers working at Devzone have created a sample in their own Github repositories that may be more minimal than those you find in nrf/samples or zephyr/samples in the SDK

    Thank you for the input, pauleffect :) 

    surya3090, Please feel free to create new cases if you have any new questions or issues that are unrelated to this case. We prefer if you create new cases for new topics so the cases can be assigned to an engineer with the proper knowledge and experience with the topic 


    Kind regards,
    Andreas

Related