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.

HalCoGen 3.04 can't change SPI baudrate

Other Parts Discussed in Thread: HALCOGEN

I am trying to set up mibSPI baud rate in  HalCoGen  3.04 release and the tool doen't allow me to do that. To verify it I made a project in previous version  HalCoGen  3.03. It is changing prescale as soon as I type it in. The same project loaded in  HalCoGen  3.04 is frizzing the prescaler.  Is there any trick?

Regards, Dmitri

  • Dmitri,

     Our Halcogen SME will look into this and get back to you.

     

    -Hercules forum support

  • I checked on another computer with HalcoGen 3.04 it doesn't work for MibSPI1,3,5 only. SPI2,4 are Ok. MibSPI1,3,5 delays don't work as well.  

    Dmitri

  • Hi Dmitri

    Sorry for the incovinence.
    MibSPI1,3,5 prescale values calculations are broke due to the minor bug while adding SPI1, SPI3, SPI5 ( which are compatible mode of MibSPI1,3,5 ) to version 3.04 from 3.03.

    We will fix this and do a patch release as soon as possible.

    Meanwhile, I have two quick workarounds you can pick any one.

    Workaround 1)

    - ONLY follow this If you are not using SPI1, SPI3, SPI5, go to C:\ti\Hercules\HALCoGen\v03.04.00\config\device.xml. Remove

    <TMS570LS3137ZWT>  ( Which ever family of device you choose for code generation ) 
    ---
    ---
     <SPI1>TMS570LS3137ZWT/SPI1v000.xml</SPI1>
     <SPI3>TMS570LS3137ZWT/SPI3v000.xml</SPI3>
     <SPI5>TMS570LS3137ZWT/SPI5v000.xml</SPI5> 
    ---
    ---
    </TMS570LS3137ZWT>

    Workaround 2)

    - Got to C:\ti\Hercules\HALCoGen\v03.04.00\drivers\TMS570LS3137ZWT\
    - Edit SPI1v000.xml..  Search for following and rename

        calcSpiPrescale1 -->     calcSpiPrescale1_spi1
        calcC2TDELAY1  -->   calcC2TDELAY1_spi1
        calcT2CDELAY1  -->   calcT2CDELAY1_spi1
        calcC2EDELAY1  -->   calcC2EDELAY1_spi1
        calcT2EDELAY1  -->   calcT2EDELAY1_spi1

    - Edit SPI2v000.xml.  Search for following and rename

        calcSpiPrescale1 -->     calcSpiPrescale1_spi2
        calcC2TDELAY1  -->   calcC2TDELAY1_spi2
        calcT2CDELAY1  -->   calcT2CDELAY1_spi2
        calcC2EDELAY1  -->   calcC2EDELAY1_spi2
        calcT2EDELAY1  -->   calcT2EDELAY1_spi2

     - Edit SPI3v000.xml.  Search for following and rename

        calcSpiPrescale1 -->     calcSpiPrescale1_spi3
        calcC2TDELAY1  -->   calcC2TDELAY1_spi3
        calcT2CDELAY1  -->   calcT2CDELAY1_spi3
        calcC2EDELAY1  -->   calcC2EDELAY1_spi3
        calcT2EDELAY1  -->   calcT2EDELAY1_spi3

    Regards
    Prathap

     

  • Hi Prathap,

    Yes it works.  Thanks. The only thing I found your Workaround 2 should look like this:

    - Got to C:\ti\Hercules\HALCoGen\v03.04.00\drivers\TMS570LS3137ZWT\
    - Edit SPI1v000.xml.  Search for following and rename

        calcSpiPrescale1 -->     calcSpiPrescale1_spi1
        calcC2TDELAY1  -->   calcC2TDELAY1_spi1
        calcT2CDELAY1  -->   calcT2CDELAY1_spi1
        calcC2EDELAY1  -->   calcC2EDELAY1_spi1
        calcT2EDELAY1  -->   calcT2EDELAY1_spi1

    - Edit SPI3v000.xml.  Search for following and rename

        calcSpiPrescale3 -->     calcSpiPrescale3_spi3
        calcC2TDELAY3  -->   calcC2TDELAY3_spi3
        calcT2CDELAY3  -->   calcT2CDELAY3_spi3
        calcC2EDELAY3  -->   calcC2EDELAY3_spi3
        calcT2EDELAY3  -->   calcT2EDELAY3_spi3

     - Edit SPI5v000.xml.  Search for following and rename

        calcSpiPrescale5 -->     calcSpiPrescale5_spi5
        calcC2TDELAY5  -->   calcC2TDELAY5_spi5
        calcT2CDELAY5  -->   calcT2CDELAY5_spi5
        calcC2EDELAY5  -->   calcC2EDELAY5_spi5
        calcT2EDELAY5  -->   calcT2EDELAY5_spi5

    Regards, Dmitri

  • Hi Dmitri, 

    Thanks for pointing out the typo's..  

    Regards
    Prathap