Dear Dialog Support,
我们正在与新的Inventek ISM14585 module. We want to port the MSK firmware to this module, using BMI160 (and later add BMM150). On the MultiSensor DK I have successfully replaced the acc/gyro with BMI160 and got it running.
现在我有一些麻烦移植固件。
观察:
(1)我不得不undef use_spi_flash_config,否则我有一个硬故障(等待spi读取闪光灯)。我不知道问题可能是什么。ISM14585的内部闪存是Gigadevice GD25D系列。
(2) I have deactivated most routines of env. sensors and the magnetometer in the code. When I start the firmware, and connect with the IoT app, UART shows the following:
==========IoT+已启动========信息:传感器初始化信息:传感器挂起信息:Adv已启动,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 start INFO:DWS cmd:17 INFO:DWS cmd:13 INFO:DWS cmd:20 INFO:DWS cmd:26
在这之后,什么也没发生。应用程序不显示任何传感器数据。
调查结果:
(A) I measured that the BMI160 interrupt is constantly high, it seems the DRDY interrupt is not working.
Apart from that, I see CS, CLK, MISO, MOSI without any abnormalities.
(B) In UM-B-101, appendix A, I discovered that the MultiSensor DK actually uses a secondary bootloader that takes care of some configuration steps; but it did not seem to me that it does anything crucial for BMI160 (whereas it does some configuration for the original acc/gyro).
In the ISM14585, OTP is burned with a secondary bootloader since the internal flash CS is mapped to P0_7 instead of P0_3 (thus it would not boot from in dev mode without this).
我的问题:
(1) 是什么原因让我看不到BMI160的中断变低了?
(2) Is the special secondary bootloader necessary? Can I port the firmware by just flashing the resulting hex file into the flash?
Your help is very much appreciated.
BR Johannes
嗨,Johannes,
Please let me know which GPIOs are connected to the BMI160 so I can run it on my side.
I am not a big fan of using the Sensor IoT tag firmware as a startingpoint for your application. You will be left with lots of halfway supported pieces of code that will end up biting you. A better approach would be to use the empty_peripheral_template project and slowly move pieces of code into that project.
/MHv
嗨,MHv,
广告1:
GPIO mapping is trivial, SPI bus is shared with flash on the standard ports for CLK/MOSI/MISO, CS (P1_3) and DRDY/INT (P0_1) I have configured correctly. Initialization should work OOB with MultiSensor DK, since the DK is capable of operating with BMI160 (which we have verified).
广告2:
制造商Inventek已将辅助引导加载程序烧成OTP。我将和他们讨论为什么他们没有按你的建议做这件事。可能是误会。
我知道如何配置SmartSnippets,毕竟我有固件运行和广告(从flash引导)。
在UM-B-101中说明MS-DK辅助引导加载程序[…]
Which is why I asked about the necessity of this specific bootloader. From looking into the code, I am under the impression that the bootloader does configure something for ICM42605, but not for the optionally populated BMI160.
对于我们以前的原型,那是基于村田ZY,我们已经移植了“旧”物联网传感器SDK,它工作得很好。当然,从头开始是一个更清洁的解决方案,但由于人力有限,剥离现有的项目是更快的方法。。。
BR Johannes
嗨,Johannes,
The IMU initialization in the secondary bootloader is not important (I frankly have no idea why we placed it there), and I don't see any reference to the BMI160 in the code. Sorry for asking obvious questions, but I assume that you have wired the BMI160 exactly as it was connected in your multi sensor kit (using the same interrupt etc). I would also assume that you have correctly initialized the bus (in the secondary bootloader this was managed for the ICM IMU - including selction of the GPIOs).
今天晚些时候我将直接联系您,帮助您解决此问题。
/MHv
嗨,MHv,
我有更多的发现。
(1) 初始化似乎是正确的,无论引导加载程序做什么,msdk也正确地配置了gpio。GPIOs和SPI参数在set\u pad\u functions和iot\u dk\u SPI\u init中配置:
(2) 我用示波器观察MISO、MOSI、CLK、CS上的执行活动。SPI似乎运作良好。
(3) 我观察到BMI160中断变高(再次显示BMI160似乎是通过SPI正确编程的),这似乎是问题的开始。固件对中断没有反应。
观察(3)我用臭氧检查行为(扰流板:我第一次使用它)。一个断点
in the file sensors_interface.c shows that the interrupt is indeed being configured. A breakpoint in
然后显示回调从未执行,尽管引脚变高。根据我们的原理图正确配置PIN:
[edit; deleted a part that I now figured is normal and does not help to find the problem]
在您先前的回复中,您表示您想与我联系,但我没有收到通知或电子邮件。你需要我的联系方式吗?
BR Johannes
edit:
(a) 我启用运动唤醒功能也是如此。我可以观察到设备进入睡眠状态,中断很低。当我移动传感器时,引脚确实会变高,但固件不会对此做出反应。
(b) 我已经为那些测试禁用了睡眠模式。
Dear Dialog Support,
I am still urgently waiting for an answer. What could be the reason for the interrupt not to work? How can I further investigate this issue with Ozone?
BR Johannes
你好,约翰内斯先生,
我对耽搁表示歉意。我完全同意MHv\u对话框,我认为最好的方法是使用空的\u模板项目,并慢慢地将代码片段移动到该项目中。但是,我会在团队内部得到他们的反馈。我会尽快给你回电。
谢谢,PM_Dialog
Hi PM_Dialog,
考虑到我们的项目与多人传感器DK有多少次(除了:缺少Env传感器,不同的磁力计,不同的引脚,不同的Flash / Pa),我希望您能理解我仍然有利于剥离/修改的方法多传感器DK。我希望你有一些想法如何调查为什么我没有看到中断。
也许我应该先用空模板测试中断功能本身。
BR Johannes
Hi PM_Dialog,
[有什么消息吗?你知道我怎么解决这个问题吗?使用臭氧进行验证的说明会很好。]
edit:
在对代码进行了长时间的调查之后,我注意到
only registers P1 and P2 are checked. Then I saw tha in UM-B-101 page 20 it is stated:
你能告诉我 - 迫切会告诉我 - 如果港口0上的中断是不可能的吗?这里的限制是什么?SDK6?多传感器DK?da14585?
edit2:
我修改了回调函数,并为端口0添加了相应的条件,它似乎没有任何缺陷。
它是非常不幸的是我花了这么长时间才发现。当然,有文件证明。。。但我从来没有想到,实施是不完整的。我很想知道原因。
BR Johannes
你好,约翰内斯先生,
According to UM-B-101 document, the 585 MSK firmware extends the possibilities of interrupt handling in order to wake up. Currently this module supports interrupts in port 1 and 2 because port 0 is reserved for other scope. Keep in mind that 585 MSK is designed to work together with MSK hardware. Please take a look at Table 1 ofUM-B-101: DA14585 IoT Multi Sensor Development Kit Developer Guidedocument in order to check the port 0 assignment. In addition, if you check the source code of wkup_ad_cb(), you will see that is configured for port 1 and 2.
谢谢,PM_Dialog
Hi PM_Dialog,
正如我在第二次编辑中所写的,我已经解决了这个问题。毕竟,在端口0上获得中断是没有问题的。
谢谢,
约翰内斯