Skip to content

Set device.DBG.cr.dbg_sleep to 1 when using wfi in the idle task. #131

@nraynaud

Description

@nraynaud

I was struggling to flash my device with openocd after I started using RTFM while googling I found this message:
https://www.jsykora.info/2014/10/error-jtag-status-contains-invalid-mode-value-communication-failure-solved/

adding this at the top of my init seems to have helped:

	#[init(schedule = [toggle])] 
	unsafe fn init() {
        let dbg = device.DBG;
        dbg.cr.modify(|_, w| w.dbg_sleep().set_bit());
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions