2015-04-02 10:59 AM
After extracting IMU from the demonstration project (merely leave out USB setting), now I face another issue is that whenever I tried to activate interrupt setting for UARTs, it hangs. (The circular LED_toggle indicating intialization stops at led3). Other various settings like qei, pwm do not clashes with this IMU. Sometimes as timer 6 and 7 are on, this situation occurs too.
I tried printing as usual in while(1), without uart interrupt setting being set, and I can see big difference between with or without IMU setting being initialized. That is the speed of transmission. Obviously, the printing in while (1) is being slowed down tremendously with IMU. But as I commented the IMU_init line, it returned to being fast transmission. Perhaps there's somewhere wrong in my IMU? But I just can't figure out.. Please help.. Thank you in advance!! #clive1 #wait-for-you--clive1-!-!-!2015-04-02 11:04 AM
Previously as I set the UARTs, I have checked pins clashing as IMU uses some I2C pins as well as SPI.
uart
1 - c4,5 2 - d5, 6 3 - b10, 11 4 - c10, 11 5 - d2, c12 IMU uses these pins spi a5,6,7 e0,1,3 i2c b6,7 e2,4,5 Attached is my IMU.c ________________ Attachments : common.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Wo&d=%2Fa%2F0X0000000bbf%2FW4GSaaXWpX3kMt6QUMKNQeSNZnm_m5w4plkxfeoydlo&asPdf=falsecommon.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0RF&d=%2Fa%2F0X0000000bbb%2F1A8qIP77BEFbAr_mtc6U8pTXoOzc1Rj9wl1jFCAnKyI&asPdf=falseIMU.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzWK&d=%2Fa%2F0X0000000bbc%2F0x7MJgUkO63_6q7jUCG2NsBAjatF4q5rxa3l.cVAntM&asPdf=falseIMU.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0dA&d=%2Fa%2F0X0000000bbY%2F_2XBu0FITWJCrOaXp006fE9uq.Bpwqip7rwlmNKwxQ4&asPdf=falsemain.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzWJ&d=%2Fa%2F0X0000000bbZ%2FTrzIrzUKkro3H0iFOIieQ.gSUAV9n.3qU52HeLeIgVM&asPdf=falsemain.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0TQ&d=%2Fa%2F0X0000000bba%2FtnPXtflJwKrdi4BGmpKg9XZkkdOXpB.A6jdk13B44po&asPdf=false2015-04-02 02:22 PM
I don't see any IRQ handler code here. You can attach files directly to a post.
2015-04-03 08:46 AM
My uart handler is relatively clean. As I just shifted them from common.c to main.c, i will attach another main.c here. Thanks!
Today I analyzed the problem and found further that whenever I use the UART pin with Handler on, the IMU led pointing north will stop moving or rather hanging (led in timer stop moving as well as this happens). However as I switched off the function IMU_Yaw, this situation does not occur regardless of UART Handler on or off. ________________ Attachments : main.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0d5&d=%2Fa%2F0X0000000bbX%2Ft1f5_IYq1ySaMgUxecjoruDSY4IXga1oeCl0bvSYXcA&asPdf=false2015-04-03 09:47 AM
This is a previous project of which I considered quite most successful among all other trials though this still end up hanging after a few shaking of the board (affecting gyroscope).
UART Handlers are in common.c Timer IRQHandlers are in main.c Init settings are in common.c and basic def in adapter.h ________________ Attachments : adapter.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I04b&d=%2Fa%2F0X0000000bbW%2Fl86jMLmUOSB.92KTr06YNbGI.AtqYHrkZmxvmq.r4YU&asPdf=falseadapter.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cr&d=%2Fa%2F0X0000000bbV%2FGpYhsveVL1y2ef64t_8iEB8QA1MLSRrxo3NrwVXUCtI&asPdf=falsecommon.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0d0&d=%2Fa%2F0X0000000bbU%2FB15in8xv0d64s9QnlnRH4KUFMZ1JjhNv9Ot4eyW6qpU&asPdf=falsecommon.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzYt&d=%2Fa%2F0X0000000bbT%2Fm6c4tVmKd76.PAL45BZry_WgPDvuqa2_0jwlzefS3pg&asPdf=falseIMU.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cv&d=%2Fa%2F0X0000000bbS%2FJYe30SXdDECJezolt9nyScElpu0KWTkbZeaNAzxGK4A&asPdf=falseIMU.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cq&d=%2Fa%2F0X0000000bbQ%2FZnNut7IvMRddHX0fD5YTAX5K.jErW_aQSsqgK0OFMR4&asPdf=falsemain.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cc&d=%2Fa%2F0X0000000bbR%2FsVEgMWy9stgs0CFvXEv1RVaumZpv94rVs4qoO3rHDog&asPdf=falsemain.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0aw&d=%2Fa%2F0X0000000bbO%2FWgXU.BkI7gocfSxkoqoU0spZKkLcaSVU9uxCoEMLFJI&asPdf=falseqei.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cl&d=%2Fa%2F0X0000000bbN%2FxtZSTxGH.s6HKEDPRRDUp_NfFNiOfPi0omZerYlPWK0&asPdf=falseqei.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0cg&d=%2Fa%2F0X0000000bbM%2FkXL.SHsZJxJDQ8LOkXZL_ZHSLQucHuoMbwluWQZJPL4&asPdf=false2015-04-04 05:30 AM