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?

Parents
  • 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

Reply
  • 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

Children
  • 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 

  • Hello Karl,

    I think the board I am working with is PDK but I am not totally sure because I have the different stickers on the box, board, and version number which give me conflicting information. I took photos of all of them and attached them. I was thinking the most valid one can be the version number sticker which over the board is 0.10.0.
    Anyway, please check them and let me know I am developing the correct board or not.

    Regards









  • Hello,

    Ali Ahmadi said:
    I think the board I am working with is PDK
    Ali Ahmadi said:
    I was thinking the most valid one can be the version number sticker which over the board is 0.10.0.

    You are correct, this is unfortunately a Preview Development Kit (PDK) and it is not recommended nor supported for production. My recommendation would be to move on to a DK before proceeding with your development.

    Where / when did you acquire this PDK from?
    If you recently purchased this PDK from a retailer or distributor I would recommend that you reach out to them directly and ask if there is any chance to get a proper DK.

    Best regards,
    Karl

  • We bought this PDK several months ago from a website. We had another development kit and I started to use it and it is DK with the version number 0.11.0. I made the setup of my project from the beginning according to nrf5340dk-nrf5340-cpuappns. Again I used the ADC example and after I run in debug mode I face the same error. I attached the photo below. It looks this error is not related to the type of the board.
    Do you have any idea how can I solve the problem?

Related