jcR 6 Posted June 17, 2018 Share Posted June 17, 2018 Hello team Energia I already asked the question for the serial port, and I never had an answer. There is also one of the simplest primitives that does not work: attachInterrupt() To work around the problem, I used gpio.h and gpio.c. But I would prefer to use the Energia functions. Can someone now look into these two issues? Can we hope!!!!!!!!!!!!! thank you in advance Quote Link to post Share on other sites
Rei Vilo 695 Posted June 17, 2018 Share Posted June 17, 2018 Please provide more information so others can help you! Information to Provide When Asking for Help Quote Link to post Share on other sites
jcR 6 Posted June 17, 2018 Author Share Posted June 17, 2018 I have posted the following remarks in Mars2018: "I use actually the MSP430FR5994 Launchpad. I can not output characters with Serial1 on the P6_0 TXD Output. I have debugged the driver and i think the "#define AUX_UART_MODULE_OFFSET 0x60" in \variants\MSP-EXP430FR5994LP\pins_energia.h must be changed to : #define AUX_UART_MODULE_OFFSET 0x20 With this change : I have debugged with a scope and P1_0 output as trigger the uart interrupt routine for Serial1 on EUSCI_A1 internal eUSCI , and all characters are transmitted, but nothing on P6_0 which is always High. has Serial1 been tested?" For the function attachInterrupt(), all I/O pins can not call the attached interrupt routine.. You can read/write I/O but not attach interrupt routine, interrupt is not called! I think the file variants\MSP-EXP430FR5994LP\pins_energia.h has too many false declaration!! But i am not specialist on Energia structure. I use Energia to program launchpads, i can debug my program but not energia ide (the last version 1.6.10E18). Quote Link to post Share on other sites
energia 485 Posted June 18, 2018 Share Posted June 18, 2018 There are no issues with the variant's pins_energia.h. There is an "issues" or rather limitation on which ports attachInterrupt() can be called on. Right now that limitation is P1 through P4. The MSP430FR5994 does have interrupt capability on all ports and to be able to support this the underlying code needs to be changed. The implementation is in the file WInterrupt.c. I have filed an enhancement request here: https://github.com/energia/msp430-lg-core/issues/64. For the Serial1 question, this smells like a bug. Would you please be so kind to file a bug here: https://github.com/energia/msp430-lg-core/issues Quote Link to post Share on other sites
jcR 6 Posted June 18, 2018 Author Share Posted June 18, 2018 Could you explain please why in pins_energia.h, there is two #define for uart 0 and 1 which are #define DEBUG_UART_MODULE_OFFSET 0x00 and #define AUX_UART_MODULE_OFFSET 0x60 but in msp430fr5994 documentation the base adress for uart 0 is 5C0h and for uart 1 base adress is 5E0h. the offset is 5E0-5C0 -> 20h not 60h in previous post i have explained the problem and i have received no response. I have tested the uart1 acces with 20h offset and for me this is the right offset to acces the Uart1. Can i be wrong !!!!! and for the I2C two pin 9-10 you have this remark: So I'm not sure that the file does not contain some errors!! Thank you for you precious help Quote Link to post Share on other sites
jcR 6 Posted June 18, 2018 Author Share Posted June 18, 2018 And for the Serial1 bug , I do not know how to do it (to open the request) Sorry Quote Link to post Share on other sites
jcR 6 Posted June 18, 2018 Author Share Posted June 18, 2018 My previous post February 14 2018: Hello all I use actually the MSP430FR5994 Launchpad. I can not output characters with Serial1 on the P6_0 TXD Output. I have debugged the driver and i think the "#define AUX_UART_MODULE_OFFSET 0x60" in \variants\MSP-EXP430FR5994LP\pins_energia.h must be changed to : #define AUX_UART_MODULE_OFFSET 0x20 With this change : I have debugged with a scope and P1_0 output as trigger the uart interrupt routine for Serial1 on EUSCI_A1 internal eUSCI , and all characters are transmitted, but nothing on P6_0 which is always High. has Serial1 been tested? it would be nice If I can get help ! Quote Link to post Share on other sites
energia 485 Posted June 19, 2018 Share Posted June 19, 2018 You are right about the offset. It needs to be 0x20. Please github issue here: https://github.com/energia/msp430-lg-core/issues/65. Same for the I2C module. This is indeed also an error in the pins file. Quote Link to post Share on other sites
jcR 6 Posted June 19, 2018 Author Share Posted June 19, 2018 I'm sorry but I do not know how to do it right. Can you do it. thank you very much Quote Link to post Share on other sites
energia 485 Posted June 19, 2018 Share Posted June 19, 2018 No need to file a github issue. It has already been done. Quote Link to post Share on other sites
TL228 0 Posted October 4, 2019 Share Posted October 4, 2019 Hello, I hope that you can help me. I have exactly the same problem as described in this topic. I work with a MSP430FR5994 lauchpad and I can not use Serial1. After reading this topic, I checked the file pins_energia.h in variants/MSP-EXP430FR5994LP and it contains the bad offset (0x60 instead of 0x20). I changed it in the file but I'm not sure that it is enough because Serial1 is always problematic. I use the last version of Energia under Linux more recent than the last reply in this topic but the offset is again wrong. Thank for your help in advance. Quote Link to post Share on other sites
jcR 6 Posted October 4, 2019 Author Share Posted October 4, 2019 I still do not understand why corrections have still not been made for this chip. As I needed these corrections, I had to do them myself although I am not a specialist on this subject. So I modified the necessary files to have access to all the pins of the MSP430FR5994, even those which are not cabled on the Launchpad, in order to be able to use them on my own cards. I enclose the modified files as well as the positions in the folders, to help the users facing the same problems as me. It would be desirable for the Energia team to finally address these issues and include these changes in a forthcoming release. Indeed this chip is perfect to make very good low consumption modules , and the ENERGIA concept makes it easy to develop the complementary software CORRECTED_BUGS.zip Derekspeegle and TL228 2 Quote Link to post Share on other sites
TL228 0 Posted October 4, 2019 Share Posted October 4, 2019 Thank you very much jcR. I suspected there would be several changes to do. I was a little discouraged. I'm going to save time thanks to you. By the way, I agree with you about this chip and the ENERGIA concept. Quote Link to post Share on other sites
Derekspeegle 0 Posted November 23, 2019 Share Posted November 23, 2019 @jcR your amazing ! I literally designed a board around the software advertising that 6.0 and 6.1 were active but was pretty disappointed when it didn't work. You've saved the day and now it works perfectly. Thanks a ton, Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.