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

DO NOT MERGE TEST ONLY [BACKPORT] stm32f40xxx_i2c isr processing #37

Closed

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Oct 17, 2018

This driver will need complete re-vetting! This is for test only with the SPI DMA branch

Due to some errant condition (I2C error or code)
The ISR was being rentered until the end of the
frame. Causing other ISR to not run for 280 uS.

Backport of Alexander Oryshchenko comits
d1cfcab, 643234d, 9b812e3 fixes this condition.

   Due to some errant condition (I2C error or code)
   The ISR was being rentered until the end of the
   frame. Causing other ISR to not run for 280 uS.

   Backport of Alexander Oryshchenko comits
   d1cfcab, 643234d, 9b812e3 fixes this condition.
@davids5
Copy link
Member Author

davids5 commented Oct 17, 2018

FYI @dakejahl, @dagar

@davids5
Copy link
Member Author

davids5 commented Oct 17, 2018

All testing is done on mro FMUv4 (RC15)

  1. Probe set and clear cost .28 uS ~.16 us for a set and .12 us for a clear.
  2. The I2C problem described above is on current master and is apparent with a
    HMC5883 on I2C bus 1 at 0x1e (bus: 100 KHz, max: 400 KHz) (same external port)
    image
    Channel 2 is the I2C ISR.
    image

I need to resurrect the the I2C killer to regression test this back port. Once that is done we should cherry-pick e5456a8 to px4_firmware_nuttx-7.22+

@dagar dagar self-requested a review October 17, 2018 13:33
@dagar dagar added the bug label Oct 17, 2018
@dagar dagar requested a review from dakejahl October 17, 2018 13:34
@dakejahl
Copy link
Contributor

I pulled this into my spi dma branch and the problem is fixed! I am no longer seeing constant FIFO resets, which was the symptom of missing the 1ms real time deadline the FIFO servicing requires.

@davids5
Copy link
Member Author

davids5 commented Oct 17, 2018

@dakejahl The i2c fix is now in px4_firmware_nuttx-7.22+ and there is a PR for it to be used in PX4/Firmware. So I will close this in favor of #38

@davids5 davids5 closed this Oct 17, 2018
@dagar dagar deleted the px4_firmware_nuttx-7.22+_DMA+I2C_fix branch October 18, 2018 15:02
PX4BuildBot pushed a commit that referenced this pull request Jan 5, 2020
Author: Alan Carvalho de Assis <acassis@gmail.com>
        Fix long line comments in the header files

Author: Mateusz Szafoni <raiden00pl@users.noreply.github.com>

    * arch/arm/src/nrf52: add GPIOTE and SAADC registers definitions

    * arch/arm/src/nrf52: update some registers definitions

    * arch/arm/src/nrf52: add basic I2C support

    * arch/arm/src/nrf52: add function to unconfigure GPIO

    * arch/arm/src/nrf52/nrf52_lowputc: add missing FAR
PX4BuildBot pushed a commit that referenced this pull request Oct 11, 2024
set CONFIG_PRIORITY_INHERITANCE=y
set CONFIG_SEM_PREALLOCHOLDERS=0 or CONFIG_SEM_PREALLOCHOLDERS=8

    #24 0x4dcab71 in __assert assert/lib_assert.c:37
    #25 0x4d6b0e9 in nxsem_destroyholder semaphore/sem_holder.c:602
    #26 0x4d80cf7 in nxsem_destroy semaphore/sem_destroy.c:80
    #27 0x4d80db9 in sem_destroy semaphore/sem_destroy.c:120
    #28 0x4dcb077 in nxmutex_destroy misc/lib_mutex.c:122
    #29 0x4dc6611 in pipecommon_freedev pipes/pipe_common.c:117
    #30 0x4dc7fdc in pipecommon_close pipes/pipe_common.c:397
    #31 0x4ed4f6d in file_close vfs/fs_close.c:78
    #32 0x6a91133 in local_free local/local_conn.c:184
    #33 0x6a92a9c in local_release local/local_release.c:129
    #34 0x6a91d1a in local_subref local/local_conn.c:271
    #35 0x6a75767 in local_close local/local_sockif.c:797
    #36 0x4e978f6 in psock_close socket/net_close.c:102
    #37 0x4eed1b9 in sock_file_close socket/socket.c:115
    #38 0x4ed4f6d in file_close vfs/fs_close.c:78
    #39 0x4ed1459 in nx_close_from_tcb inode/fs_files.c:754
    #40 0x4ed1501 in nx_close inode/fs_files.c:781
    #41 0x4ed154a in close inode/fs_files.c:819
    #42 0x6bcb9ce in property_get kvdb/client.c:307
    #43 0x6bcd465 in property_get_int32 kvdb/common.c:270
    #44 0x5106c9a in tz_offset_restore app/miwear_bluetooth.c:745
    #45 0x510893f in miwear_bluetooth_main app/miwear_bluetooth.c:1033
    #46 0x4dcf5c8 in nxtask_startup sched/task_startup.c:70
    #47 0x4d70873 in nxtask_start task/task_start.c:134
    #48 0x4e04a07 in pre_start sim/sim_initialstate.c:52

Signed-off-by: ligd <liguiding1@xiaomi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants