Jump to content
43oh

Serial1 not Working, attachInterrupt not Working


Recommended Posts

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

Link to post
Share on other sites

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).

 

 

Link to post
Share on other sites

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

 

Link to post
Share on other sites

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

 

Link to post
Share on other sites

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 !

Link to post
Share on other sites
  • 1 year later...

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.

Link to post
Share on other sites

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

Link to post
Share on other sites
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...