This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Problem with Event and Interrupt in NRF52 !

Hi Forum! I have to understand NRF52 chip for my job! I used to work with STM32 before. It has "Interrupt" (e.g when I receive one byte via SPI, It generates one "SPI_Rx_Interrupt". I can implement my code in the callback function(read this byte, toggle led....) ) .But with NRF52 chip. I can't read anything similar. NRF52 has "Event". This is a new concept with me!

  • I don't know what is "Event".
  • Do have any relation between "Event" and "Interrupt"? ( I think "Yes" ).
  • How is NRF52 chip can detect when the event occurs? ( If I receive one byte via SPI, how is nrf52 detect it?)
  • How can I creat "My_Event" myself?

I hope devTeam can help me in all my question because NRF52 code example is very hard to learn. Thanks all!

    1. I want to use NRF52. I think this chip is exciting. :)
    2. Yes. I interest into low-level interrupt. I want to know how can 2 nrf52 chip can connect(step by step) via BLE :). I don't want dependent example on the SDK.
  • nRF52 chips is definitely interesting, it just comes with price: you need to write the software in certain way in order to get all the potential out of it (also I don't get how this point relates to the questions and answers in this thread but anyway it's nice to know that you like nRF52;).

    To your second question: you need to understand there are 3 basic components to achieve full BLE functionality.

    1. HW which has 2.4GHz front-end which can achieve all the features required by BLE spec.
    2. BLE stack because you need at least LL and L2CAP layers and 99% of applications use whole stack including Security Manager, ATT, GATT and GAP.
    3. Your APP which gives the stack specific profile configuration to really do something useful (otherwise BLE stack is useless and device won't do anything without top layer). To achieve this here comes SDK combining stack API and HW abstraction.

    (1/2)

  • can you tell me what is occur in two nrf52( one central and one peripheral) to have BLE_GAP_EVT_CONNECTED event? :)

  • (2/2)

    Now sorry if I misunderstand your English but is it correct that you don't want to use Nordic stack and SDK? This is possible but then please keep in mind:

    • Developing your own BLE stack - even to do some basic things - is task which solid SW development team can do in 1 or 2 years. Yes, if you are genius programmer you can do your own minimalistic version alone in few months but it's bloody work and overall unnecessary.
    • Or you simply use some stack and API which is available. You have obvious choice of Nordic Soft Device and then you very likely want to use Nordic nRF5 SDK (but you don't need to use many things, you can stay with just SD API headers if you really want). Or you can go with some open source variants like Zephyr. Or you can try to buy/license some proprietary stack for nRF52 . But still you need some standard interface to it = some kind of SDK.
  • Finally before you will keep asking pretty basic questions please take a break, find some good explanation of BLE stack architecture and basic procedures, read it few more times (I guess you read it already but repeating might help) and then also read couple of times Soft Device specification and message sequence charts. For example your last question about BLE_GAP_EVT_CONNECT is answered by one of these charts.

Related