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

Standard Drive,Low Frequency I/O P1.07 & P1.05 can not configure as input output in BLE blinky example

Hi,

Greetings!

I want to use GPIO P1.07 & P1.05, which are specific Standard Drive,Low Frequency pins. 

I used these same gpio pins in SPI peripheral example and it running well but when I was going to integrate this code in BLE_peipheral_blinky example, the error fault occurs. I can not configure this two pins as input or output. The code is running well when I changed these IO pins and set as GPIO P0.30 & P0.31. 

Why I can't configure these specific pins in BLE_peripheral_blinky example? Is there any setting require to do in sdk_config file? I just don't get where is the exactly problem?

 I used BMD340 module and BMD340 evaluation board.  Can you please help me out?

Thanks in advance.

Regards,

Pooja Uchagaonkar

Parents
  • Greetings, Pooja Uchagaonkar!

    I want to use GPIO P1.07 & P1.05, which are specific Standard Drive,Low Frequency pins. 

    I used these same gpio pins in SPI peripheral example and it running well but when I was going to integrate this code in BLE_peipheral_blinky example, the error fault occurs. I can not configure this two pins as input or output. The code is running well when I changed these IO pins and set as GPIO P0.30 & P0.31. 

    Could you elaborate on which error is generated?
    The reason why the pins P1.07 and P1.05 are designated as low-frequency ( < 10 kHz ) pins, is that they are located in close proximity with the radio - and higher frequency on these pins will degrade radio performance.
    However, there is no checks in place to forcibly stop you from using those pins - you may do as you like - but be advised that it may affect radio performance. Since there are not checks in place, there should not be any errors generated either, when using these pins - which is why it would be helpful to know the specific error, and from which function it was generated.

    It might also be the case the the BMD340 evaluation board uses these pins for something else, and that you therefore may not use them - you can read about this in the BMD340 evaluation board documentation.
    Since P0.30 and P0.31 is working, I would think that this might be the case. Since these two pins are analogue read pins, u-blox has probably kept them available for that reason. This is just a guess on my part, as I personally have never worked with the BMD340 module.

    Why I can't configure these specific pins in BLE_peripheral_blinky example?

    Keep in mind that our SDK examples are made for specific board layouts, such as the nRF52 DK, or the nRF52840 DK, and there is no guarantee that they will work as described without modification on other PCA's.

    Please do not hesitate to let me know if anything still should be unclear, or if you encounter any other issues.

    Best regards,
    Karl

  • Hi Karl,

    Thank you so much.

    Actually Project PCB is already designed so I can not change Port pins now. But as per your suggestion, We will keep it mind and modify in the next version of PCB. But I have to use this pins now.

    The error code is 3735928559 at C:\nordic\modules\nrfx\hal\nrf_gpio.h file 

    When I am going to configure any port 1 GPIO's pins, this problem is occurred. But it is not happened with port 0 GPIO,s pins. 

    One another thing is when I configured this Port 1 pins in SPI_peripheral example, it configured and running well. But when I integrated it into main code - BLE_peripheral_blinky example and trying to configured, the error generated. So if BMD340 evaluation board used such pins, it should run on SPI_peripheral example. 

    However I checked datasheet and user guide of BMD340 evaluation board.  These pins are not utilized for any purpose.

    I just don't understand why it is happening. 

    Thanks & Regards,

    Pooja Uchagaonkar 

  • Hi Pooja Uchagaonkar,

    Pooja Uchagaonkar said:
    Thank you so much.

    No problem at all, I am happy to help!

    Pooja Uchagaonkar said:
    Actually Project PCB is already designed so I can not change Port pins now. But as per your suggestion, We will keep it mind and modify in the next version of PCB. But I have to use this pins now.

    I understand. You may negate the negative impact in the program. if you are able to ensure that high-frequency signals are not transmitted on these pins while the radio is active.

    Pooja Uchagaonkar said:
    The error code is 3735928559 at C:\nordic\modules\nrfx\hal\nrf_gpio.h file 

    Have you connected the device to a debugger, and are you using Segger Embedded Studios IDE?
    If so, could you make sure that DEBUG is defined in the preprocessor defines, as shown in the included picture below?

    If you have DEBUG enabled then you should see exactly what error code is generated, and which function has returned the error.

    Pooja Uchagaonkar said:
    One another thing is when I configured this Port 1 pins in SPI_peripheral example, it configured and running well. But when I integrated it into main code - BLE_peripheral_blinky example and trying to configured, the error generated. So if BMD340 evaluation board used such pins, it should run on SPI_peripheral example. 

    Could you confirm for me that you successfully ran the SPI peripheral example (which SPI example by the way, nrfx_spim?) on the BMD340 module without having to make any modifications?
    And then, when you added that exact code into the BLE blinky peripheral example, then you receive some error regarding the pin configuration on port 1. Is this correct?

    Best regards,
    Karl

  • Hi Karl,

    So sorry for late reply. I was work on another thread so this issue is still pending.

    As debug shows, the error code is 3735928559 and error is generated in this file C:\nordic\modules\nrfx\hal\nrf_gpio.h file.

    Yes, I used nrfx_spim example but in that example I don't use nordic spi driver, I generated clock pulses of spi and take data by configuring gpio in and out.

    However I also got that this port 1 configuration problems occurs in my running program only. It does not happen with nordic blinky example. In my example, I configure timer, TWI peripheral and also developep long byte service and characteristics. So I think something wrong happened at the time of integrating all code in specially sdk file. 

    But I just don't get why it is happening and how to resolve this problem?

    Thanks,

    Pooja Uchagaonkar 

Reply
  • Hi Karl,

    So sorry for late reply. I was work on another thread so this issue is still pending.

    As debug shows, the error code is 3735928559 and error is generated in this file C:\nordic\modules\nrfx\hal\nrf_gpio.h file.

    Yes, I used nrfx_spim example but in that example I don't use nordic spi driver, I generated clock pulses of spi and take data by configuring gpio in and out.

    However I also got that this port 1 configuration problems occurs in my running program only. It does not happen with nordic blinky example. In my example, I configure timer, TWI peripheral and also developep long byte service and characteristics. So I think something wrong happened at the time of integrating all code in specially sdk file. 

    But I just don't get why it is happening and how to resolve this problem?

    Thanks,

    Pooja Uchagaonkar 

Children
  • Hello Pooja Uchagaonkar,

    Pooja Uchagaonkar said:
    So sorry for late reply. I was work on another thread so this issue is still pending.

    No problem at all, I completely understand.

    Pooja Uchagaonkar said:
    As debug shows, the error code is 3735928559 and error is generated in this file C:\nordic\modules\nrfx\hal\nrf_gpio.h file.

    Did you define DEBUG in the preprocessor defines as I described below? If you did, you will also have to change the active build configuration to debug in order to see the change in effect. The definition of the DEBUG define will improve this error message you are seeing, so that we may see exactly which error is generated and where it is generated.

    Pooja Uchagaonkar said:
    Yes, I used nrfx_spim example but in that example I don't use nordic spi driver, I generated clock pulses of spi and take data by configuring gpio in and out.

    I am not sure I understand you correctly here. Are you telling me that you have opted to not use the provided SPI drivers, and instead bit-bang the SPI protocol? This seems redundant with the drivers readily available, and could be the cause for a range of issues.
    In fact, seeing as your error was generated in the GPIO hal file, I would think this could be the cause.

    Pooja Uchagaonkar said:
    However I also got that this port 1 configuration problems occurs in my running program only. It does not happen with nordic blinky example. In my example, I configure timer, TWI peripheral and also developep long byte service and characteristics. So I think something wrong happened at the time of integrating all code in specially sdk file. 

    Are you using the TWI peripheral in addition to the SPI peripheral, or is this a typo?
    Please check that there is no issue with the Shared Resources between the TWI and SPI peripheral.

    In the case that I have misunderstood your approach, please elaborate.

    Looking forward to resolving this issue together,

    Best regards,
    Karl

  • Hi Karl,

    I solved the issue. I changed the sdk_config file as per the ble_blinky project & further done changes as per peripheral requirements and it works. But I didn't get where is the exactly problem was happened. Might be I configured something wrong in that file.

    Actually I want two use two I2C peripherals and one SPI peripheral. I aware about the shared resources base address. So I am going to plan use TWI0 & TWI1 instance for two I2C sensors and SPIM2 instance for SPI peripheral respectively. Will you please confirm me for this?

    Thank you so much for your guidance. 

    Thanks,

    Pooja Uchagaonkar

  • Hello Pooja Uchagaonkar,

    Pooja Uchagaonkar said:
    Thank you so much for your guidance. 

    No problem at all, I am happy to help!

    Pooja Uchagaonkar said:
    I solved the issue. I changed the sdk_config file as per the ble_blinky project & further done changes as per peripheral requirements and it works.

    I am glad to hear that you were able to resolve your issue!
    It sounds reasonable that a configuration error was the cause of your issue.

    Pooja Uchagaonkar said:
    Actually I want two use two I2C peripherals and one SPI peripheral. I aware about the shared resources base address. So I am going to plan use TWI0 & TWI1 instance for two I2C sensors and SPIM2 instance for SPI peripheral respectively. Will you please confirm me for this?

    Yes, according to the shared resources ID table there is no conflict here, so this configuration will be fine.
    As a side note, you may also have multiple SPI / TWI slaves connected to the same bus, if you should want to add more peripheral slave devices later, but it is also fine to use one TWIM instance per peripheral device.

    Please do not hesitate to open a new ticket if you should encounter any other issues or questions.

    Good luck with your development!

    Best regards,
    Karl

Related