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

example of Timer and ADC

Hello,

I need an example of Timer and ADC for nrf5340. Already I checked this example but it is unclear and also has some error with semaphore. could you please give me a clear example of ADC and timer seperately?

  • Hello,

    Already I checked this example but it is unclear and also has some error with semaphore.

    Do you mean that you have followed this guide, but it resulted in an error?
    What did this error message say?

    could you please give me a clear example of ADC and timer seperately?

    Unfortunately, we do not have a specific example of just the SAADC and Timer separately, but this is what is meant to be covered by the nRF Connect NCS Tutorials.
    If you did follow the second part of the tutorial, did you first complete the preceding parts?

    Best regards,
    Karl

  • when I add the project configuration of the adc to prj.conf I face with the error in building the code. I attached the photos below:




    Another question is which part of the project option I can define my device? 

  • Ali Ahmadi said:
    when I add the project configuration of the adc to prj.conf I face with the error in building the code. I attached the photos below:

    It seems like you are getting a lot of undefined references errors - indicating that your environment is not properly set up, or that your project is missing some header files.
    How did you setup you working environment?
    By the way, it might be useful for you to see the zephyr ADC driver example as an example of how you may use the driver.

    Ali Ahmadi said:
    Another question is which part of the project option I can define my device? 

    You do not need to set this in your project, as you decide which device to build for when you start the building.
    The line you have highlighted here is if defined, so that you may add different functionality in the case that you build for a specific board or configuration.

    Furthermore, it seems from your error messages that you are working with the PDK, and not a DK, could you confirm whether this is the case?

    Best regards,
    Karl

  • I am working with NRF5340 - PDK development board.
    I set up my working envirnment according to Your first “Hello World” 1.1 Set it up

    After I removed the highlighted line from prj.config all of the errors disappeared and I build the code and run the board in the debug mode. After I run the board it stuck in one part of the code which I attached as a second photo. The error is "Stopped by vector catch" and the issue can be that the option "Memory Segments" is not properly set and also the option "Section Placement Macros". Those options are set by default! Do you have any idea how can solve it?

  • Hello,

    Thank you for your patience.

    Ali Ahmadi said:
    I am working with NRF5340 - PDK development board.

    This is conflicting information - are you working with the Preview Development Kit (PDK) or the Development Kit (DK)? The PDK is not recommended for active development of a device, since it - as a pre-release version - have many issues and bugs which have since been fixed.
    Could you please tell me what the sticker on the debugger says?

    We will need to establish which hardware you are working with, before we proceed with the debugging.

    Looking forward to resolving this issue together!

    Best regards,
    Karl 

Related