This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

430Boost Sharp 96

Hi All,

I am using a rev 1.1 Red MSP-EXP432P401R launch pad.  (I have tried this with the black one as well.)

I am using the 430Boost Sharp96 Boosterpack.

I am using an TI-RTOS 2.16.0.08 

I am using MSP432 Driverlib 3.10.00.09

I am trying to get the Sharp 128x128 LCD Display to work.  I have been partially successful, let me explain.

In the 430Boost Sharp96 example I can build and run the 96x96 version on the Booster. If I modify the SharpLCD96.h file and set the LCD size to 128 by 128, this example works fine with the 128x128 LCD in the boosterpack. In other words, I can simple switch between the two LCD Displays by changing the extents in the header file. This example is not using RTOS.  I think this may be important.

I now have an RTOS application the application uses both I2C and the LCD.  It too works perfectly fine with the 96x96.  As soon as I try to change to the 128x128 I get nothing.  As a matter of fact, if I run the 430Boost example and then run the RTOS, the screen retains the graphic from the 430boost example.  It is like it is getting nothing.

You help would be greatly appreciated. 

Thanks 

John

  • Hi John,

    I think you meant spi instead of i2c. Please correct me if I'm wrong.

    Anyway, I put together the attached example code, it uses tiRTOS v2.16 and the 430BOOST SHARP96.

    tiRtos_v2_16_430BOOST-SHARP96_GrlibExample_MSP432P401R.zip

    Hopefully this helps.

     David

  • I mean I2C AND SPI are both being used in my application , SPI only for the LCD. And they both work fine with the 96x96 display, that is obsolete BTW.

    Your code does not use the 128 x 128 LCD. Did you try it with a 128x128 display? That is what I am having the trouble with.

    Again, the 128x128 works as long as I dont use TI-RTOS, As soon as I try to use it with RTOS, it stops working. I think it is a timing issue but I cant figure out which timers I need to change.

    I tried to compile the sample code above but it wants me to install a new compiler.  I actually looked and my installation has the correct compiler installed.  Perhaps I am missing something.

    So I implemented the timer and interrupt code in your example into my code, still not working.  Works fine with the 96 but not with the 128.

  • Are we still working on this?
  • John,

    I don't think David or myself have a 128 x 128 LCD to test with. It is strange that I2C is causing the issue only for the larger LCD & with TI-RTOS, especially considering that the LCDs use SPI communication. And the only change involves the SharpLCD96.h? This does seem to be a timing issue, can you state what the I2C and SPI clock speeds are in the C example vs the TI-RTOS library? Try altering each to see if anything changes. When using the debugger, what behavior is seen? Are any values sent to the eUSCI TX buffer, are interrupts serviced correctly, and does the code get stuck in a while loop trap?

    Regards,
    Ryan
  • Hi Ryan,

    Let me clarify a few things:

    I dont think I2C is involved in the problem. I created an empty RTOS project and added the graphics library and the LCD driver. It works in 96x96 mode with the 96x96 display. When I change it to 128 it does not work.

    This test had no I2C in it. As a matter of fact it didn't even have the VCOM timer. The is a heartbeat task that blinks LED0 every 1000 uS.

    I am currently working on a Non RTOS empty project I should have that going shortly and I will send you an update.

    I have a scope connected to the SPI bus and the signals look dramatically different between the application that works and the one that doesnt.  


    Thanks
    John

  • Hi Ryan,

    I have made some progress. I now have a Non-RTOS app that I can make work and not work by changing the value of __SYSTEM_CLOCK, from 3000000 to 12000000. I am trying to figure out how that clock maps to the clock in the RTOS app. There are several different timers. I have changed a couple of them but I am just kind of grasping at straws.

    I hope that my discovering the system clock thing helps lead us along.

    I have only been working with the MSP432 for a few days now so please bear with me.

    Thanks
    JP
  • Hi JP,

    This is indeed good progress and supports my assumption that the I2C/SPI clock speeds are involved. You can output ACLK/SMCLK/MCLK onto their respective pins to help debug your system, knowing the I2C/SPI source clocks between the two project types would also be good information to have. I think that the TI-RTOS I2C settings are changing your SPI clock source, which breaks the SPI communication with the LCD.

    Regards,
    Ryan
  • Ok, that makes sense. But why does it work with the 96 but not the 128? Everything is staying the same except the display resolution.

    What do I do to output the clocks to my scope? I already have the SPI clock into the scope. Which pins can I put the other clocks on?

    Thanks
    JP
  • I'm not sure why it's working on one LCD as compared to the other. ACLK is on P4.2, MCLK on P4.3, and HSMCLK on P4.4, the P4DIR and P4SEL bits must be set accordingly (this information is stored in the Datasheet, Table 6-70). Recording I2C vs SPI clocks for all instances would be helpful.

    Regards,
    Ryan

  • Ok, so MCLK on the NON RTOS example is running at about 120 Ms HIGH and the 55 MS Low (Roughly), on the RTOS example it is running much faster, on the order of 7ms high and 800 uS low.

    How do I change the MCLK configuration?
  • I honestly do not know, having very little TI-RTOS experience myself. It might be worth asking the TI-RTOS Forum.

    Regards,
    Ryan
  • Ok, How do I move this whole thread into the RTOS forum? I dont want to rehash all of this.
  • Link to this thread if desired, but in the end the new topic (changing MCLK frequency in TI-RTOS) is unrelated to these efforts.

    Regards,
    Ryan
  • Hello,

    You can change the default Performance Level in "MSP_EXP432P401R.c" (PowerMSP432_config.initialPerfLevel)

    /*
     *  =============================== Power ===============================
     */
    const PowerMSP432_ConfigV1 PowerMSP432_config =
    {
        .policyInitFxn = &PowerMSP432_initPolicy,
        .policyFxn = &PowerMSP432_sleepPolicy,
        .initialPerfLevel = 2,
        .enablePolicy = false,
        .enablePerf = true,
        .enableParking = false
    };

    And these are the levels supported:

    /*
     * Notes for initial implementation of Power_setPerformanceLevel()
     *
     * 1) There are three performance levels supported:
     *
     *    Level    MCLK (MHz)    HSMCLK (MHz)    SMCLK (MHz)    ACLK (Hz)
     *    -----    ----------    ------------    -----------    ---------
     *      0         12              3              3           32768
     *      1         24              6              6           32768
     *      2         48             24             12           32768

    Hopefully this helps.

      David

  • As someone mentioned, the engineering is a strict science. When you buy such IC units like Sharp 128x128 LCD Display, you get an technical documentation how it works from engineering prospective. So, it means that you need to modify communication protocols though SPI so, that it fulfills all specifications for such a device. Even Sharp 96x96 LCD have SPI speed limitations with additional delays needed to process incoming data.
    If TI have made 'proof of concept' with sample codes and high-level LCD drivers, it does not mean that it will work with all kind of LCD displays.
    As an engineer (not as end-user) you should modify it for your needs yourself.

  • PS: Different Sharp Memory LCDs have different working voltages, framerates, delays, pixel-bit-mapping, different polarization technologies,
    'heart-beat' frequencies etc. It is normal that your new LCD is not working with TI's MCU out-of-box.

  • I solved this problem in the TI-RTOS forum. Myself I might add. I am not sure how you lecturing me adds value to the discussion. But thanks for sharing your expertise...
  • This is exactly the function I used.  See this thread for more detail 

    https://e2e.ti.com/support/embedded/tirtos/f/355/p/552357/2022266#2022266

  • Oh, not so many people say 'thanks' to me, even if it does mean nothing. :)

**Attention** This is a public forum