Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect information about attachSystemInterrupt for Boron #1126

Open
AndrewMoscoe opened this issue Nov 7, 2020 · 3 comments
Open

Incorrect information about attachSystemInterrupt for Boron #1126

AndrewMoscoe opened this issue Nov 7, 2020 · 3 comments

Comments

@AndrewMoscoe
Copy link

AndrewMoscoe commented Nov 7, 2020

https://docs.particle.io/reference/device-os/firmware/boron/#attachsysteminterrupt-

If I try to compile that example code for Boron, I get an error:

error: 'SysInterrupt_TIM5' was not declared in this scope
   22 |     attachSystemInterrupt(SysInterrupt_TIM5, timer_event_handler);

From a brief look at the deviceOS code, I think this function is for other platforms, and is not implemented for the Boron?

@pkourany
Copy link
Contributor

pkourany commented Nov 8, 2020

@AndrewMoscoe, the Gen3 devices only have four usable timers:

0: Softdevice - do not use
1: Radio - Used by BLE (and mesh)
2: Usart (Serial1) Can use if not using Serial1.
3: Usart (Serial2 on Xenon) Cannot be used on Argon or Boron because it’s required by NCP.
4: NFC - recommended (unless you need NFC).

@AndrewMoscoe
Copy link
Author

AndrewMoscoe commented Nov 8, 2020

Yes. The documentation for the Boron section of DeviceOS includes that block, which is wrong.

That system interrupt block also works for none of the four timers on the boron. From what I can see in the DeviceOS code, it is not implemented.

@pkourany
Copy link
Contributor

pkourany commented Nov 9, 2020

@rickkas7, Gen3 devices do not have the same interrupt designations for timers nor do they have a timer5. The examples given for attachSystemInterrupt() and attachInterruptDirect() for Gen3 devices incorrectly refer to Gen2 interrupts and timers. There needs to be Gen3-specific examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants