亲爱的对话支持,
我们正在使用新的Inventek ISM14585模块。我们希望使用BMI160(稍后添加BMM150)将MSK固件端口移植到此模块。在MultiSensor DK上,我已成功用BMI160替换了ACC / Gyro并获得运行。
Now I have some trouble porting the firmware.
Observations:
(1)我不得不undef USE_SPI_FLASH_CONFIG,否则I got a hard fault (waiting for SPI to read the flash). I don't know what the problem could be. The internal flash of ISM14585 is a GigaDevice GD25D series.
(2)我已经停用了大多数env的例程。在代码中的传感器和磁力计。当我启动固件时,并与IOT应用程序连接,UART显示以下内容:
========IoT+ STARTED======== INFO: Sensors Initilization INFO: Sensors Suspend INFO: Adv Started, value:160 INFO: IoT+ Connected INFO: Sensors Initilization INFO: Sensors Suspend INFO: DWS cmd: 21 INFO: DWS cmd: 22 INFO: DWS cmd: 11 INFO: DWS cmd: 1 INFO: Sensors Started INFO: DWS cmd: 17 INFO: DWS cmd: 13 INFO: DWS cmd: 20 INFO: DWS cmd: 26
After this, nothing happens. The app does not show any sensor data.
Findings:
(a)我测量的是,BMI160中断不断高,似乎DRDY中断不起作用。
除此之外,我看到CS,CLK,MISO,MOSI没有任何异常。
(b)在UM-B-101中,附录A,我发现MultiSensor DK实际上使用了处理某些配置步骤的二级引导加载程序;但是,我对BMI160对此至关重要,这对BMI160至关重要(而且它对原来的ACC / Gyro做了一些配置)。
在ISM14585中,OTP用辅助引导加载程序刻录,因为内部闪存CS被映射到P0_7而不是P0_3(因此它不会在没有此的DEV模式下启动)。
My Questions:
(1) What can be the reason that I don't see the interrupt from BMI160 going low?
(2)是必要的特殊二级引导程序吗?我可以通过将生成的十六进制文件闪烁到闪存中来端口固件吗?
非常感激你的帮助。
BR Johannes.
Hi Johannes,
请告诉我哪个GPIO连接到BMI160,所以我可以在我身边运行它。
我不是使用传感器物联网标记固件作为应用程序的起点的大粉丝。你将留下很多一半的支持代码,最终会咬你。更好的方法是使用extent_peripheral_template项目并慢慢将代码移动到该项目中。
/ mhv.
Hi MHv,
ad 1.:
GPIO映射是微不足道的,SPI总线在CLK / MOSI / MISO的标准端口上与闪存共享,CS(P1_3)和DRDY / int(P0_1)配置正确。初始化应使用多传感器DK工作,因为DK能够与BMI160(我们已验证)操作。
ad 2.:
A secondary bootloader has been burned to OTP by the manufacturer Inventek. I will discuss with them why they have not done it as you suggested. Maybe it is a misunderstanding.
我知道如何配置SmartSnippets, after all I have the firmware running and advertising (booting from flash).
In UM-B-101 it is stated that the MS DK secondary bootloader [...]
这就是为什么我询问这个特定引导加载程序的必要性。从调入代码,我是在印象中,引导加载程序为ICM42605配置了一些东西,但不适用于选项填充的BMI160。
For our previous prototype, that was based on the Murata ZY, we have ported the "old" IoT Sensor SDK, which as worked just fine. Certainly starting from scratch is a cleaner solution, but with limited manpower, stripping down an existing project is the faster approach...
BR Johannes.
Hi Johannes,
二级引导加载程序中的IMU初始化并不重要(坦率地说不知道为什么我们将其放置在那里),我没有看到代码中BMI160的任何引用。抱歉提出了明显的问题,但我假设您已经完全连接了BMI160,因为它在多传感器套件中连接(使用相同的中断等)。我还要假设您已正确初始化总线(在二级引导程序中,这是针对GPIOS的ICM IMU的ICM IMU的管理。
I will reach out to you directly later today to help troubleshoot this.
/ mhv.
Hi MHv,
I have some more findings.
(1) The initialization seems to be correct, whatever the bootloader may do, the MS DK also configures the GPIOs correctly. GPIOs and SPI parameters are configured in set_pad_functions and iot_dk_spi_init:
(2) I observe the exepcted activity on MISO, MOSI, CLK, CS with an oscilloscope. SPI seems to be working fine.
(3) I observe that the BMI160 interrupt goes high (shows again that the BMI160 seems to be programmed correctly through SPI), and this seems to be were the problem starts. The firmware does not react to the interrupt.
Following the observation (3) I have inspected the behavior with Ozone (spoiler: I used it for the first time). A breakpoint in
在文件Sensors_Interface.c中显示了中断确实已配置。一个断点
then shows that the callback is never executed, although the pin goes HIGH. The pin is correctly configured according to our schematic:
[编辑;删除了一部分,我现在认为是正常的,没有帮助找到问题]
In your earlier response you indicated that you wanted to contact me, but I did not receive a notification or email. Do you require my contact info?
BR Johannes.
编辑:
(a) The same is true is I enable the wake on motion feature. I can observe that the device goes to sleep, the interrupt is low. When I move the sensor, the pin indeed goes high, but the firmware does not react to it.
(b) I have disabled sleep mode for those tests.
亲爱的对话支持,
我还在迫切等待答案。什么可能是中断不工作的原因?如何使用臭氧进一步调查此问题?
BR Johannes.
Hi gme_johannes,
My apologies for the delay. I totally agree with MHv_Dialog and I think the best approach would be to use the empty_peripheral_template project and slowly move pieces of code into that project. However, I will the Team internally to get their feedback. I will get back to you as soon as possible.
谢谢,PM_DIALOG.
嗨pm_dialog,
considering how much our project has in common with the MultiSensor DK (everything except for: missing env sensors, different magnetometer, different pinout, different flash/PA), I hope that you can understand that I still favor the approach of stripping down/modifying the MultiSensor DK. I hope that you have some ideas how to investigate why I don't see the interrupt.
Maybe I should start with testing the interrupt functionality itself with the empty_peripheral_template.
BR Johannes.
嗨pm_dialog,
[any news? Any idea how I can solve this problem? Instructions for verification with Ozone would be great.]
编辑:
After lenghty investigations in the code, I noticed that in
仅检查寄存器P1和P2。然后我在UM-B-101中看到了这个问题:
Can you please tell me - urgently - if interrupts on port 0 are not possible? What is the restriction here? SDK6? MultiSensor DK? DA14585?
编辑2:
I have modified the callback function and just added according conditions for port 0, it seems to work without a flaw.
It isVERYunfortunate how long it took for me to find this out. Sure, it is documented... but I would never have guessed that the implementation is incomplete. I would be very curious to understand the reason.
BR Johannes.
Hi gme_johannes,
根据UM-B-101文档,585 MSK固件扩展了中断处理的可能性,以便唤醒。目前,此模块支持端口1和2中的中断,因为端口0保留用于其他范围。请记住,585 MSK旨在与MSK硬件一起使用。请看一下表1UM-B-101:DA14585 IOT多传感器开发套件开发人员指南文档以检查端口0分配。此外,如果检查WKUP_AD_CB()的源代码,则会看到端口1和2配置了。
谢谢,PM_DIALOG.
嗨pm_dialog,
as I've written in the second edit, I have solved the problem. It was unproblematic to get the interrupt on port 0, after all.
Thanks,
Johannes