Search Result

665 results found on Nordicsemi

Article 110 | News 393 | Product 162 | All results

60225 results found on DevZone

DevZone - first 10 hits

NRFX_TIMER1_INST_IDX Error I need help.

Hello, everyone. I use sdk v17 and pca10040. I put the example 'pwm_library' in the example of 'ble_app_uart'. However, an error occurs at NRFX_TIMER_INSTANCE(id) in nrfx_timer.h. A similar problem was found and the NRFX_TIMER_ENABLEED was corrected from 0 to 1 in sdk_config.h. This is the PWM code I wrote. //Buzzer(PWM) APP_PWM_INSTANCE(PWM1,1); // Create the instance "PWM1" using TIMER1. static volatile bool ready_flag; // A flag indicating PWM status. void pwm_ready_callback(uint32_t pwm_id) // PWM callback function { ready_flag = true; } . . . int main(void) { bool erase_bonds; //PWM setting ret_code_t err_code; app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(1500, buzzer_pin); //period_in_us(sound), pin /* Switch the polarity of the second channel. */ pwm1_cfg.pin_polarity[1] = APP_PWM_POLARITY_ACTIVE_HIGH; /* Initialize and enable PWM. */ err_code = app_pwm_init(&PWM1,&pwm1_cfg,pwm_ready_callback); APP_ERROR_CHECK(err_code); //app_pwm_enable(&PWM1); //pwm start // Initialize. uart_init(); log_init(); timers_init(); buttons_leds_init(&erase_bonds); power_management_init(); ble_stack_init(); gap_params_init(); gatt_init(); services_init(); advertising_init(); conn_params_init(); //================================================================================================================================= //add Initialize bsp_board_init(BSP_INIT_LEDS); //board led init //bsp_board_init(BSP_INIT_BUTTONS); nrf_drv_systick_init(); //systick init //buttons_init(); //

forum

8/11/2020

Is the Memory Layout correct?

Dear I am trying to locate the data area of application code from device (nRF52840). From here , it show me the bootloader will locate at from 0x000 F 8000 – 0x000F E000(24KB) and application data will locate from some where of application area to 0x0007 7FFF. So I do some thing below: Step 1. Erase a dongle by " nrfjprog --e" and flash "nRF5_SDK_16.0.0_98a08e2\examples\dfu\open_bootloader \pca10059_usb_debug" Step 2. To take look the MBR and bootloader area by Programmer tools: MBR: 0x0000 0000 --- 0x0000 0FFF 4096 Byte BL : 0x000E 0000 ---- 0x000F DFFF 122880 Byte Step 3: Add hex of SD: S140 v7.0.1 in Programmer tools M BR或APP: 0x0000 0000 ---- 0x0000 0AFF 2816 Byte SD: 0x0000 1000 ---- 0x0002 6597 152984 Byte Step 4: Add hex of Light-switch server for PCA10059 in Programmer tools: APP1:0x0002 7000 ---- 0x0004 6009 126986 Byte APP2:0x0004 600C ---- 0x0004 87bBB 10160 Byte

forum

8/11/2020

btt_gatt_write in nus_c never gets reply

I'm currently running on nRF Connect SDK (hash: 4b012fb4882f0ddd3de9f339ebc5a3f1c3cacd4a). I'm running a connection between a nRF91+nRF52840 (as central running NUS_C) using HCI plus a separate nRF52840 (as peripheral running NUS service). For the most part, the notifications coming from the peripheral are spot on. The device has consistently sent thousands of messages with no problem. On the other side though, sometimes the NUS_C_RX_WRITE_PENDING flag never gets cleared. This means the on_sent callback never gets called. I'm at a loss as to why this may be happening. Is there anything I can do to figure out where it's getting stuck in the process? It seems silly to reset the connection if the write gets "stuck". Thanks!

forum

8/10/2020

Changing UART0 pins for Custom nrf9160 board?

Hello, I have recently used the new toolchain manager to upgrade to ncs v1.3.0. Now I am using Segger Embedded Studio to flash an nRF9160 with the at_client sample. My issue is that I am not able to use pins 0 and 1 as UART0 on my custom nRF9160 board. I have created the file ncs\v1.3.0\nrf\samples\nrf9160\at_client\nrf9160_pca10090ns.overlay &uart0 { status = "okay"; tx-pin = ; rx-pin = ; rts-pin = ; cts-pin = ; }; I also put this same text into a new file: ncs\v1.3.0\nrf\samples\nrf9160\spm\nrf9160_pca10090.overlay Other than the fact that I don't get any response when I send AT commands to these pins, or get any data out at reset, I found that if I look at the file ncs\v1.3.0\nrf\samples\nrf9160\at_client\build_nrf9160_pca10090ns\zephyr\include\generated\devicetree_unfixed.h I can find the lines: #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin 29 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin_EXISTS 1 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rx_pin 28 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rx_pin_EXISTS 1 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rts_pin 27 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rts_pin_EXISTS 1 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin 26 #define DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin_EXISTS 1 #define

forum

8/10/2020

Mesh Opcodes and linking them to the handler in the access layer

I've been writing a vendor model for Bluetooth mesh based on the light lightness model in the SDK. I'm extending the generic level model into my model - a window openess level model. It's far complete, but it's to the point where I want to be able to receive generic level model messages from the NRF Mesh app. I've been investigating what happens when I receive a mesh message and how it propagates to the user call backs. I'm developing on a Windows 10 machine, using SES 4.52c using SDK 16.0 and Mesh SDK 4.1.0. I get my mesh message and it arrives in access.c. On line 1070 the opcode handler is called, but that it where the program dead ends and never calls into my model. I'm not sure what I am missing that links the opcodes to the function in my model. static const access_opcode_handler_t m_opcode_handlers[] = {

forum

8/10/2020

Zephyr + Argon (nRF52840) + UART with interrupts

Howdy, I'm trying to get Zypher up and running with the Particle Argon board using the nRF52840 chipset. The goal is to get both Bluetooth and UART working, but for now the question is, "How do I enable UART0 with interrupts". Background: I'm using using PlatformIO as the IDE, a J-Link for debugging / programming, and Zephyr as the RTOS. PlatformIO is configured and able to write and debug to the board. Zephyr has the call uart_callback_set that let's a user register a callback. However, the compiler report back: undefined reference to `uart_callback_set' . In the uart.h file, uart_callback_set relies on a #define called CONFIG_UART_ASYNC_API . After reading around, this should be unlockable through the project.conf file. I've configured mine based on the Zephyr docs and this post , though it is a different chipset. Here is the config file: CONFIG_DEBUG_OPTIMIZATIONS=y CONFIG_EXCEPTION_STACK_TRACE=y CONFIG_DEBUG_INFO=y BOARD_ADAFRUIT_FEATHER_NRF52840=n #UART Config CONFIG_SERIAL=y CONFIG_UART_CONSOLE=n CONFIG_SERIAL_SUPPORT_ASYNC=y CONFIG_SERIAL_SUPPORT_INTERRUPT=y

forum

8/10/2020

Availability for downloading MESH sdk documentation?

Is the mesh 4.2.0 sdk documentation available for download? I know that the sdk16.0.0 was downloadable on the infocenter ? But the same is not available for mesh 4.2.0. Where I live, I have slow internet, so its for favorable to use the downloaded version of documentation.

forum

8/10/2020

Read incoming RF packet carrier offset

Hi, Is it possible to access the relative carrier offset of a received RF packet from the radio? Specifically, I'm wondering of there's a register I can access that has this info in some form. Thanks! Mark

forum

8/10/2020

BLE service configuration help requiered. Update speed over 100hz

Hello, sorry to bother once more. I am new to the nRF world and bluetooth in general, I am trying to build a device /app that gets data from 3 sensors. 2 of which operate at 100hz+ and the third one at around 1-2hz Each device collects data on 3 axis. So I have 3 custom BLE services with 3 custom characteristics that I created. Those char receive floats as byte arrays of 4 bytes. Currently I have the timers of service A & B at 10ms to match the 100hz rate. When the timer expire, I read the value from the sensors through i2c and send the results through ble sd_ble_gatts_hvx(). So I have 3 updates every 10ms of 32bits floats for both A and B. My other service C does the same thing but with 1000ms timer. Independently those services work fine, when ever I turn on notifications

forum

8/10/2020

Louder Speaker with Nordic Thingy 52

The out-of-box configuration of Thingy 52 has a 89dB, 8 ohm, 0.7W speaker. Can I replace that with a much louder speaker such as 4W or 5W one 4 ohm or 8 ohm? 44

forum

8/10/2020