Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

sdk_config overwritten by sdk_old_config

hello nordic

i have been working with nrff52832 with the SDK16.0 (also working with s132 if it matters)

it is a real head braking to deal with your never ending sdk_config.h, today i found out that he has an even more evil origen which is the sdk_old_config.h 

why do we need 2 files defining the same things, seems like a very poor solution to whatever problem 

i wish to configure a timer by enabling NRFX_TIMER_ENABLE so i change it in the sdk_config.h but it does nothing, i have tried to disable every definition that seems related to legacy but still nothing changes 

please help it been to many hours of try and error with no real programing because of that

best regards and hope for better days

Ziv

  • Hi Ziv,

    ziv123 said:
    its a code i was working on with the other project i just minimized it, the basic was the central app_ble_blinky example, to that in the other project i added the app timer, pwm, twi, uart, saadc and i think that's it . but i don't need all of that in the current project just ble scanning and a timer for pin toggling, later there will be more things like twi i think, some communication for sure.

    Adding a timed pin toggle to the central BLE blinky project, understood. At what frequency will this pin need to toggle? - and what is the use-case you have in mind?
    As detailed in the migration to nrfx guide I referenced in my previous comment most of the nrfx communication drivers are "straight forward" to add to your project - should you encounter any issues with this please let me know.

    ziv123 said:
    you want the whole 12030 lines of sdk_config lines here? i am guessing i didn't understand your meaning, but the sdk_config is just defines it does not revile anything on my project to my understanding so i don't mind sharing if i understood better what to share 

    If you are going to share the sdk_config please upload it using the "Insert->Insert file" option here on DevZone - do not copy its contents directly into the reply.
    Seeing the entire file will make it easier to understand what you are referencing in your previous replies.

    I can make the ticket private at any time in the future, if you should feel that it needs to be viewable by only us here at Nordic and you yourself. Just let me know if you would like me to make this change.

    Best regards,
    Karl

  • 0207.sdk_config.h

    also, since i have started with the pwm now .. is it an ok approach working with pwm, .. just to have something working and then go again on the timer if there is time? 

  • Hello again Ziv,

    Looking at the sdk_config you have provided I see that you have not made the changes that I mentioned to the TIMER_ENABLED legacy define.
    In the sdk_config you provided TIMER_ENABLED is still defined, but with the value 0.
    You will need to remove it completely, either commenting it out or removing it from the file all together.

    Furthermore, you must enable NRFX_TIMER_ENABLED by setting it to 1, along with one of the timer instances.
    You may also remove the APP_TIMER_ENABLED, since you do not want to use the app_timer library.

    ziv123 said:
    also, since i have started with the pwm now .. is it an ok approach working with pwm, ..

    Since I do not know the use-case for your application or what you intend to make this application do its hard for me to tell you that it is an ok approach.
    In the case that you want to toggle the pin just to control the brightness of a LED or servo motor then I would certainly recommend the PWM library, but if you are trying to bit-bang then I would recommend against it. All I currently know about the application is that you want to toggle a pin at a frequency higher than the RTC - which does not tell me much about what the pin will end up being used for.

    Best regards,
    Karl

  • hi Karl

    Looking at the sdk_config you have provided I

    ok , i did as you explained , removing and not just enable set to '0', and compilation went ok .. so that was great and thanks A LOT for that. i will need that experience in the future for sure. however, at the moment there is a change in stepper motor so it seems for now that the app_timer will do just fine after all. sorry for all the fuss over nothing but like i said it is a good experience for me because for sure i will need that someday. 

    so i also gave up the pwm :) 

    right now i am moving to build a code that transmit ble beacon / no connection advertising

    if you can recommend a good ble example to start from that will be great .. i will need to receive data via uart or twi and transmit it via ble to several units with identical code (each will have its own id)

    i am thinking of starting from 'ble_peripheral -> ble_app_beacon example .. though it seems that it is advertising a fixed message and i need to be able to change the data in the message according to data from uart.. anyway, if i struggle with that to much i will open another thread 

    thanks a lot for this one 

    i mark it answered for now Slight smile

    best regards

    Ziv

  • Hello Ziv,

    ok , i did as you explained , removing and not just enable set to '0', and compilation went ok ..

    I am glad to hear that it resolved your issue. It is a common mistake to leave the unused legacy _ENABLED defined to 0, so it is definitely something to look out for in the future as well.

    that was great and thanks A LOT for that

    No problem at all, Ziv.
    I am glad you found my replies useful!

    however, at the moment there is a change in stepper motor

    Up until now you have never told me that this was in order to control a stepper motor. Now that I know, I would definitely recommend that you use the app_pwm library to control it instead.

    so i also gave up the pwm :) 

    The PWM Library usage (app_pwm) is demonstrated in the PWM Library example, and the PWM Peripheral is demonstrated in the PWM driver example, I would recommend that you take a look at those if you need to generate a PWM waveform.

    right now i am moving to build a code that transmit ble beacon / no connection advertising

    if you can recommend a good ble example to start from that will be great .. i will need to receive data via uart or twi and transmit it via ble to several units with identical code (each will have its own id)



    Just to be clear, you would like to create a beacon ( non-connectable ) that will broadcast data it receives over UART?
    In that case, I would suggest that you begin with the BLE peripheral beacon example and then merge inn the UART functionality from the peripheral UART example to receive data over UART.
    Then you will need to modify the beacon to update its manufacturer specific data, to contain the received UART data.

    Keep in mind that you will need two advdata_t instances which you alternate between advertising and updating, if you intend to use the advdata_update function from the advertising library.

    i am thinking of starting from 'ble_peripheral -> ble_app_beacon example .. though it seems that it is advertising a fixed message and i need to be able to change the data in the message according to data from uart.. anyway, if i struggle with that to much i will open another thread 

    Yes, this is exactly what you need to do. Sorry, I wrote the above suggestion before reading this part of your reply, my bad.
    Please open a new ticket if you should encounter any issues or questions.

    Good luck with your development!

    Best regards,
    Karl

Related