DA14583 BLE_Peripherals Problems ?

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
eslam snono
Offline
Last seen: 1 year 9 months ago
Joined: 2018-05-02 13:56
DA14583 BLE_Peripherals Problems ?

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 

Device: 
PM_Dialog
Offline
Last seen: 5 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi eslam snono,

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.

  1. Do you mean to start/stop adverting and put the chip into sleep mode?
  2. Is device configured in Peripheral or Central mode?
  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.
  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.
  5. 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?

Thanks, PM_Dialog

eslam snono
Offline
Last seen: 1 year 9 months ago
Joined: 2018-05-02 13:56
Do you mean to start/stop
  1. Do you mean to start/stop adverting and put the chip into sleep mode?

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

PM_Dialog
Offline
Last seen: 5 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi eslam snono,

Hi eslam snono,

  1. You could take a look at the ble_app_sleepmode example of the SDK - 5.0.4\projects\target_apps\ble_examples\ble_app_sleepmode. This example uses a timer to stop advertising. Upon timer expiration, the device stops advertising and goes into permanent sleep mode. Keep in mind that when it is in any of the available sleep modes, all the peripheral domains are powered down. Only an external event can wake up the chip.
  2. According to BLE core specifications, the chip can act either as a GAP Peripheral role (advertising) or as a GAP Central role (scanning). A BLE connection in only initiated by the Central device.
  3. Please clarify what you are trying to accomplish. Do you want to have BLE functionality too?
  4. Please define the WDOG, as the code might be got stuck somewhere. Then please run it with the debugger attached.

Thanks, PM_Dialog

eslam snono
Offline
Last seen: 1 year 9 months ago
Joined: 2018-05-02 13:56
Still have same problems and

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.

PM_Dialog
Offline
Last seen: 5 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi eslam snono,

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