Dear Dialog Semiconductor,
I have reached to the point that i think your DA14583 is not suitabe for development. You in many topics ask people why you use it and suggest your other processors like DA14531, DA14585, DA14586 to use. I think that DA14583 and SDK5.0.4 is not reasonable for development as your documentation and support is limited.
Any way i wish you help me to change my mind specially that i have asked here before and didn't get the solution.
So, My problem is now that i have a custom board with DA14583. I am using the I2C for RTC, OLED, LED driver. Also, iam using GPIO to control Relay. My code is existed in arch_main.c in while(1).
I have some problems that in any processor is so easy to figure out:
1- how i can turn ON/OFF BLE using a button?
2- how i can to get the connected ble device name ?
3- how i can use the peripherals I2C, ADC and GPIO in normal way in while(1) ?
4- Why when i make software reset for the DA14583 using sw_reset() function that i get from SDK in secondary_bootloader example, The BLE stops advertising and some times cause freezing?
5- why some times when using ADC with BLE the DA14583 freezes?
Please i need a real answers not ask is there any reasons for using DA14583.
i am really going to change it later but at time being i have to use it, So Please help me in these problems.
Thanks in advance
Hi eslam snono,
Yes, DA14531 or DA14585/586 are recommended for new designs/projects, as there isn’t any roadmap for DA14580/3 and SDK5.
Thanks, PM_Dialog
yes i need to start and stop advertising.
2. Is device configured in Peripheral or Central mode?
sorry i didn't get the point here.
3. You could take a loot the peripheral examples of the SDK - 5.0.4\projects\target_apps\peripheral_examples. However, if you are planning to have BLE activity too, keep in mind that the Watchdog mechanism will be fired up and a reset will take place. Please refer to the datasheet for more info to the Watchdog mechanism.
i am already using ble_app_peripheral example as the base for my code.
4. Is the device booting from RAM or Flash? If it is booting from RAM, after the reset, the code is lost, and you should re-program it.
i am booting from flash and i know if from ram after reset the code will be lost.
Could you please run it in debug mode to check where it freezes? Is it due to Watchdog expiration, due to NMI or an assertion takes place?
i am not using watchdog , i have #undef CFG_WDOG
thanks in advance for your response
Hi eslam snono,
Thanks, PM_Dialog
Still have same problems and i am really soryy that your answers don't help.
last question for me, Could you please help me to use any of your examples or any thing to control only the BLE to turn on and turn off using a button?
i have your EVK (DA14580DEVKT-P_VC) and it has two switches (SW2, SW3) i need to use any one of them to control BLE.
When pressed BLE is OFF or advertising is stopped, and when released BLE is on or advertising start.
so please reply me with any real answer that i can use, thanks in advance.
Hi eslam snono,
As mentioned in my previous response, I would strongly suggest you checking the ble_app_sleepmode example of the SDK. This example demonstrates how to use the sleep mode API and change the sleep mode in runtime. The device advertises for a predefined amount of time (APP_ADV_DATA_UPDATE_TO), default value is 10 s. As long as the device is in the advertising state its sleep mode is set to deep sleep. After the expiration of the above timeout, and if the device does not enter the connected state, it stops advertising. Now the chip does nothing and waits for an external event to exit the sleeping state. The examples is using the SW3 button to wake up. Once the button is pressed, the device will start to advertise again for the predefined time. When it enters the connected state then the sleep mode is turned to extended sleep.
Please app_button_enable() function to check how to configure the wake up controller so that it can detect a GPIO interrupt.
In you case, you should use the wake up controller to stop advertising instead of the app_easy_timer() that the examples is using.
>>When pressed BLE is OFF or advertising is stopped, and when released BLE is on or advertising start.
This is not possible, as the debouncing time is 63 msec.
Thanks, PM_Dialog