-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Description
Has anyone sucessfully run examples/ieee802154_tx.rs on the nRF52840-DK? When I tried, it would hang on the line Ieee802154::set_tx_power(tx_power).unwrap(); or if I commented that out then on the next line Ieee802154::set_channel(channel).unwrap();. So for example the modified code in examples/ieee802154_tx.rs
fn main() {
// Configure the radio
let pan: u16 = 0xcafe;
let addr_short: u16 = 0xdead;
let addr_long: u64 = 0xdeaddad;
let tx_power: i8 = 5;
let channel: u8 = 11;
writeln!(Console::writer(), "Starting...\n").unwrap();
writeln!(Console::writer(), "dbg0-1\n").unwrap();
Ieee802154::set_pan(pan);
writeln!(Console::writer(), "dbg0-2\n").unwrap();
Ieee802154::set_address_short(addr_short);
writeln!(Console::writer(), "dbg0-3\n").unwrap();
Ieee802154::set_address_long(addr_long);
writeln!(Console::writer(), "dbg0-4\n").unwrap();
//Ieee802154::set_tx_power(tx_power).unwrap(); //if this is not commented out it will hang here.
writeln!(Console::writer(), "dbg0-5\n").unwrap();
Ieee802154::set_channel(channel).unwrap();
writeln!(Console::writer(), "dbg1\n").unwrap();
produces the output
tock$ Initialization complete. Entering main loop
NRF52 HW INFO: Variant: AAF0, Part: N52840, Package: QI, Ram: K256, Flash: K1024
Starting...
dbg0-1
dbg0-2
dbg0-3
dbg0-4
dbg0-5
It never printed "dbg1".
Also for some debug info I ran
tock$ list
PID ShortID Name Quanta Syscalls Restarts Grants State
0 Unique ieee802154_tx 0 45 0 0/15 Terminated
tock$ status
Total processes: 1
Active processes: 0
Timeslice expirations: 0
tock$ kernel
Kernel version: 2.3 (build unknown)
╔═══════════╤══════════════════════════════╗
║ Address │ Region Name Used (bytes) ║
╚0x200085CC═╪══════════════════════════════╝
� ┼─────────────────────────────── S
│ Relocate 4 R
0x20002008 ┼─────────────────────────────── A
│ ▼ Stack 8192 M
0x20000008 ┼───────────────────────────────
.....
0x0002D000 ┼─────────────────────────────── F
│ RoData 41050 L
0x00022FA6 ┼─────────────────────────────── A
│ Code 143270 S
0x00000000 ┼─────────────────────────────── H
tock$ reset 0
Initialization complete. Entering main loop
NRF52 HW INFO: Variant: AAF0, Part: N52840, Package: QI, Ram: K256, Flash: K1024
Starting...
dbg0-1
dbg0-2
dbg0-3
dbg0-4
dbg0-5
tock$
As a check I was successfully able to run libtock-c/examples/tests/ieee802154/radio_tx/main.c and capture it's over the air packets with a wireless analyzer. Also its output was
tockloader listen
[INFO ] No device name specified. Using default name "tock".
[INFO ] Discovered "/dev/ttyACM0" as nRF52840dk VCOM0.
[INFO ] Using "/dev/ttyACM0 - J-Link - CDC".
[INFO ] Listening for serial output.
Transmitted successfully.
Transmitted successfully.
Transmitted successfully.
Transmitted successfully.
Transmitted successfully.
Transmitted successfully.
Transmitted successful
Metadata
Metadata
Assignees
Labels
No labels