Receiving Packets on gets tricky ... Because SX1276 triggers a GPIO Interrupt when a packet is received ... And the Interrupt Handler needs to forward the packet to the Application Task 🤔

github.com/lupyuen/bl_iot_sdk/

Simple fix for a PlatformIO build error in 's LoRaP2P_TX sample ... My first Pull Request for WisBlock!

github.com/RAKWireless/WisBloc

GPIO Interrupts: Should we use Sync or Async Interrupts for ? 🤔 ... BL602 IoT SDK uses Async Interrupts to handle GPIO Buttons ... Let's do the same for LoRa

github.com/bouffalolab/bl_iot_

Maybe High Level Trigger Interrupt = High Priority Interrupt = Sync Interrupt? 🤔 ... Lemme check the original Chinese Reference Manual

github.com/bouffalolab/bl_docs

My bad ... High Level Trigger Interrupt = 高电平触发中断 = Trigger Interrupt on Logic High ... Nothing to do with priority 🤔

github.com/bouffalolab/bl_docs

Transmitter ... Sniffed by Airspy R2 SDR ... Watch the distinctive LoRa Chirp (red spike)

youtu.be/USqStub3KC0

And still hangs when transmits Packets ... Chaos Magic 🤔

Something spooky about GPIO Interrupts 🤔 ... Let's disconnect SX1276 pins DIO1 to DIO3 ... And connect DIO0 to my fav Blue LED (GPIO 11)

github.com/lupyuen/bl_iot_sdk/

GPIO Interrupts hanging could be due to the way we handle multiple GPIO Interrupts ... Let's revisit this when we can trigger multiple GPIO Interrupts from SX1276

github.com/lupyuen/bl_iot_sdk/

Now that can handle Packet Received Interrupt ... Let's defer the LoRa Packet Processing from the Interrupt Handler to the Application Task ... How shall we do this in FreeRTOS? 🤔

github.com/lupyuen/bl_iot_sdk/

Shall we teach Multitasking with NimBLE Porting Layer? 1️⃣ Looks easier than FreeRTOS 2️⃣ It's portable to FreeRTOS, Mynewt, NuttX and RIOT OS 🤔

lupyuen.github.io/pinetime-rus

Our Build, Flash and Run Firmware script generates the Disassembly ... Let's track down the address of the RISC-V Exception

github.com/lupyuen/bl_iot_sdk/

Exception happened because we passed a pointer to a stack object ... Which gets used by the Interrupt Handler 😲 ... This works OK in the original Mynewt code, but not for BL602

gist.github.com/lupyuen/1539f9

Reference Manual mentions "GPIO_INT_CLR" but the address is undefined in the doc ... Methinks a chunk of addresses are missing from the doc 🤔

github.com/bouffalolab/bl_docs

Show newer

@lupyuen
Interested in riscv. Please tell me more. Are You Chinese? Based in cm or us?

I need nickname for ya. Im bad bad with little worms for characters. No offence meant. Honestly.

Ill try to promote you around polish opensource geeky part of fedi if you want.

@PawelK Hi call me Lup (rhymes with "Up"), I'm just a geek in Singapore. Here's the story of my life 😉 ...

lupyuen.github.io/

I'm tied up with projects right now ... Sorry I won't be able to help you much

@lupyuen
No worries. Thanks for intro im polish retired young. Based c/cpp. 15 years of exp. Mostly embeds. Some 4g and 5g infrastructure devel experience. Selftaught. IT is my life. Nerd. Pro opensource.

Riscv is the postarm. We need it badly.

@lupyuen
Also what could interest You Sir is llvm+clang seem to support riscv. They seem nicer fuller and more maintainable than gcc if that was of any help. Methinks #clangisthenewgcc

@lupyuen
Are those two platforms using two different operating systems? Generally depends whether irq handler lives in same adress space as setup code. General guideline for portable code should be using either static data accessible from irq code or dynamically allocated data passable between two adress spaces.

@lupyuen
In case both oses are same or with same model of memory segments divide/sharing, seems like a bug to me.

@PawelK Yeah the code looks a bit suspicious ... Generally I would never save a pointer to a stack object. But this code has been in Apache Mynewt OS for a long time 🤔

@lupyuen
This code has assumption os shares adress space between irq segment and irq setup code.

Sorry for side comment. Deleted. Mistake.

@lupyuen
My reasoning is mynewt on both platforms should have constraints on segment duvide/sharing independent of platform. Thats puzzling.

@lupyuen
Lovely. Wish You much success. Interesting project and great platform. Whats the planned use for these little animals?

@PawelK Thanks :-) I'm planning to use this for IoT Education ... Teaching folks how to create a RISC-V LoRa Sensor that's battery powered...

lupyuen.github.io/articles/lor

lupyuen.github.io/articles/wis

@lupyuen
Need to learn more on lora though for final decision.

Also in your example each process has separate stack while globals are in shared adress space. Interesting os. Feels similar to what i was doing for ericsson.

@lupyuen
Ahhh now i see. Lemme browse through their source. Old code is borked. Youre assigning to struct type a pointer type instead of RadioEvents = *events.

How come compiler let it compile...

@lupyuen
Ahh ah. Ok its porting between oses and separate adress spacrs problem it seems. Another concern may be if struct shoukdnt be volatile but i dont know enough sbout code to tell.

Show newer
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.