Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by juani_c

  1. I'm trying to comunicate with a FXOS8700CQ. (Energia 13-MSP430G2553)

    When I use this code:


    Wire.beginTransmission(0x1E);   // Initialize the Tx buffer
    Wire.write(FXOS8700CQ_OUT_X_MSB);                // Put slave register address in Tx buffer
    Wire.endTransmission(false);       // Send the Tx buffer, but send a restart to keep connection alive
    Wire.requestFrom(0x1E, 6);  // Read bytes from slave register address 
      while (Wire.available()) {
    dest[i++] = Wire.read();
    I get what it's seen in the bottom of the image. The second time the addres is sent it should be a "read" instead of "write".
    When using just Wire.endTransmission();, that is whitout "false", the STOP is sent (top of the image), this is not how the communication with the sensor should be, BUT now the second time the addres is sent correct as a "read".
    It's like the Wire.requestFrom() is not actually reading. Any ideas?


    I see you also stumbled on the reprogramming of the BSL. Glad you worked it all out in the end.


    You could add some stand-offs to the corners of your board so you don't damage your point to point work.

    That's a good idea! Either that or some sort of box.

  3. The compiler generates a .map file which contains detailed information about memory allocation. You find it in the Release or Debug folder.

    That file shows the same values that I see in the Memory Allocation.  The thing is why it shows me only 344 bytes, from that I get that I still have RAM to do other things...

  4. I'm testing Mahony's algorithms for attitude estimation and I'm using a Launchpad with a MSP430g2553. In the code I'm using there are two functions; one calculate the attitude from accelerometer and gyro data (IMU) and the other one add magnetometer data (AHRS).

    I tested first the IMU and worked OK.

    Then I tested the AHRS and I couldn't make it work. What I could find through debugging was this:

    In the top of the program there are four variables q0=1, q1=0, q2=0 and q3=0 and in the algorithm there is a sqrt() function, it seems that for some reason the sqrt() function overwrite the values in q0, q1, etc. As the algorithm use then those values the final values is of course wrong.

    I then tried the program with AHRS in a MSP-EXP430FR5739 and it worked OK.

    According to CCS the Memory Allocation in the MSP430G2553 is RAM=344 FLASH=12.354

    and in the MSP430FR5739 is RAM=518 FLASH=13.034.


    It seems that the code need 518 bytes of RAM, higher than the 512 of the MSP430G2553, I asume that's the issue, correct?

    If is that, why CCS shows only 344 bytes used? Is there some way to know when I'm running out of RAM (other than the thing don't working...)? some way to see it in CCS?

  5. Suppose you have an application like SimpliciTi that says:" low memory needs(<8kB flash and 1kB RAM depending on the configuration)", you also have in your program the Petit FAT file system: "Very small RAM consumption (44 bytes work area + certain stack), Very small code size (2K-4K bytes)", finally you have some inertial sensors to calculate some angles, like in Nine-Axis Sensor Fusion Using the Direction Cosine Matrix Algorithm on the MSP430F5xx Family AppNote, where you need RAM ~ 0.75 kB, Flash ~ 11.7 kB.


    flash 8kB       + RAM 1 kB

    flash 4kB       + RAM 44 B

    flash 11.7kB  + RAM 0.75 kB


    How do you choose the memory requirements for the microcontroller. The flash should be big enough to acomodate all the applications. Is the same case with the RAM? should I add together those values? Is the RAM used only when I'm using that particular app, for example I need 0.75kB only when I'm doing the math for the sensor fusion?



  6. @@juani_c Can you go to a lower baud rate ..9600? and test.


    Also, please upload your pic to your post(no external images allowed). :) Thanks.

    Yes, 9600 worked OK.

    19200 showed some spikes, but much less than the picture (thats spikes are just the way the graphic software interprets the wrong data). For a few moments in one of my many test it worked OK with 115200. I just have to find out what I did different... 

  7. I'm trying to communicate an MSP430 to my laptop through a KC-21 module. Below is a capture of the data with the msp430 using a 115200 baudrate.




    As you can see it has some issues. I tested a few things:

    Sending data with the msp430 at 115200 and an FT232 => THIS WORKS OK

    Sending data from the computer through the FT232 to the BT module and back to the PC, all at 115200 => THIS WORKS OK

    Sending data with the msp430 at 9600 and the BT module => THIS WORKS OK


    So it seems that the problem is isolated to the MCU working at 115200 with the module.

    I had problems in the past with BT modules, the problem was an inprecise baudrate. Could this be the case? The baudrate slowly drift and eventually is bad enough to confuse the module. How do you think I could test to find out if that the case? How do you think I could fix it?


  8. I had a couple of bluetooth com port, first I disabled them and then uninstalled them. Now It seems to run a little bit faster but It's far from optimum. Also updated Java but It was the same.

    I downladed the Energia Enhanced Release for Windows and that one seems to work OK.

  9. Hi there!

    is there a way to speed up Energia? I use Win7 and is kind of a pain, the main problem is the menu, when I want to drop down a menu I have to wait a while and the software stop responding.

    Is there an easy way to solve this? 

  10. A few days ago I was doing some testing and programed a MSP430F2013 using a ez430-f2013 but only uploaded a "blink" sketch. I select the board "LaunchPad w/ MSP430G2231 1Mhz".

    If you look in the devices datasheets you'll see that both have the configurations registers (at least the for Port1 and 2) at the same address. Also both chips have the same device ID, so I'm thinking that some code will be compatible.

    As semicolo said you program the chips using the Spy-By-Wire interface (that is RESET and TEST) it has nothing to do with the UART 

  • Create New...