[riot-notifications] [RIOT-OS/RIOT] riotboot: irq not enabled after jumping to slot (#12311)

Bas Stottelaar notifications at github.com
Thu Sep 26 23:07:32 CEST 2019

#### Description
While working on #11940, I noticed that all EFM32 boards I own work, except the SLTB001a.

This board has a I2C power interrupt controller that is used during `board_init()` after `cpu_init()`. I2C is using interrupts in combination with `__WFE()`. I noticed that `tests/riotboot` did not work, unless I skipped the I2C part. After a lot of debugging and testing, I added `irq_enable()` before [this line](https://github.com/RIOT-OS/RIOT/blob/master/cpu/efm32/periph/i2c.c#L60), and it worked!

My hypothesis is:
- when jumping to the slot by the bootloader, `irq_disable()` is invoked
- it is not enabled/reset during startup of the actual slot
- the transfer uses `irq_disable()` and `irq_restore()`, so it stays disabled
- therefore, the slot boots differently then without riotboot.

This is a bit out of my league, and I don't have a good idea to solve this. Maybe my driver is wrong? Maybe the startup needs to be changed?

#### Steps to reproduce the issue
Take the SLTB001a and use #11940. Try to run `tests/riotboot`.

#### Expected results
The test results should appear, and you can interact with the shell.

#### Actual results
No test results appear, and no interaction is possible.

#### Versions
Operating System Environment
       Operating System: Mac OS X 10.14.6
                 Kernel: Darwin 18.7.0 x86_64 i386

Installed compiler toolchains
             native gcc: Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
      arm-none-eabi-gcc: arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 8-2019-q3-update) 8.3.1 20190703 (release) [gcc-8-branch revision 273027]
                avr-gcc: missing
       mips-mti-elf-gcc: missing
             msp430-gcc: missing
   riscv-none-embed-gcc: missing
   xtensa-esp32-elf-gcc: missing
   xtensa-lx106-elf-gcc: missing
                  clang: Apple LLVM version 10.0.1 (clang-1001.0.46.4)

Installed compiler libs
   arm-none-eabi-newlib: "3.1.0"
    mips-mti-elf-newlib: missing
riscv-none-embed-newlib: missing
xtensa-esp32-elf-newlib: missing
xtensa-lx106-elf-newlib: missing
               avr-libc: missing (missing)

Installed development tools
                  cmake: cmake version 3.15.3
               cppcheck: missing
                doxygen: missing
                    git: git version 2.23.0
                   make: GNU Make 3.81
                openocd: missing
                 python: Python 2.7.16
                python2: Python 2.7.16
                python3: Python 3.7.4
                 flake8: error: /usr/local/opt/python/bin/python3.7: No module named flake8
             coccinelle: missing

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190926/0ecf2b20/attachment-0001.htm>

More information about the notifications mailing list