Closed marshalblx closed 1 year ago
Hi @marshalblx! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
cc @JordanYates @carlescufi
Describe the bug When calling the "pwm_set_pulse_dt" API shortly after an "Unhandled interrupt on CPU 0" is encountered.
Please also mention any information which could help others to understand the problem you're facing:
To Reproduce Steps to reproduce the behavior:
static void set_leds(const struct led_color *color, uint32_t brightness) { int ret;
uint32_t red_scale = COLOR_SCALE(color->red, brightness); uint32_t red_pulse = COLOR_SCALE(red_scale, red_pwm_led.period); ret = pwm_set_pulse_dt(&red_pwm_led, red_pulse); if (ret != 0) { LOG_ERR("%d: red write failed", ret); }
uint32_t blue_scale = COLOR_SCALE(color->blue, brightness); uint32_t blue_pulse = COLOR_SCALE(blue_scale, blue_pwm_led.period); ret = pwm_set_pulse_dt(&blue_pwm_led, blue_pulse); if (ret != 0) { LOG_ERR("%d: blue write failed", ret); }
uint32_t green_scale = COLOR_SCALE(color->green, brightness); uint32_t green_pulse = COLOR_SCALE(green_scale, green_pwm_led.period); ret = pwm_set_pulse_dt(&green_pwm_led, green_pulse); if (ret != 0) { LOG_ERR("%d: green write failed", ret); } }
Booting Zephyr OS build zephyr-v3.4.0 I: Starting bootloader I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Boot source: primary slot I: Swap type: none I: Bootloader chainload address offset: 0xc000 I: Jumping to the first image slot
[00:00:00.012,634] bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.012,695] bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.012,725] bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.4 Build 99
[00:00:00.012,939] bt_hci_core: No ID address. App must call settings_load()
[00:00:00.012,939] main: bt_ready: Bluetooth initialized
[00:00:00.288,421] bt_hci_core: Identity: D4:DB:DE:27:BA:45 (random)
[00:00:00.288,452] bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1
[00:00:00.288,482] bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff
[00:00:00.288,513] main: bt_ready: Mesh initialized
uart:~$
[00:02:24.100,982] button: button_work_handler: new press time 144100
[00:02:24.101,013] button: button_pub: hold time: 1
[00:02:24.101,043] main: button_press_listener: new press
[00:02:24.101,165] bt_mesh_prov_device: Device UUID: 2c11f66c-a095-0cf5-0000-000000000000
[00:02:24.102,355] NRFX_PWM: nrfx_pwm_stop returned 1.
[00:02:24.102,386] NRFX_PWM: nrfx_pwm_stopped_check returned 1.
[00:02:24.102,416] NRFX_PWM: Function: nrfx_pwm_simple_playback, sequence length: 4.
[00:02:24.102,447] os: >>> ZEPHYR FATAL ERROR 1: Unhandled interrupt on CPU 0
[00:02:24.102,508] os: Current thread: 0x20002600 (sysworkq)
[00:02:24.215,576] os: Halting system
uart:~$