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.

Trouble initializing mibspi1 with HalcoGen

Other Parts Discussed in Thread: HALCOGEN

Hi,

  I have a simple SPI application built in the IAR development environment.   I am using mibspi1.  The halcogen-generated

function mibspiInit() is getting hung here:

/** - wait for buffer initialization complete before accessing MibSPI registers */
/*SAFETYMCUSW 28 D MR:NA <APPROVED> "Hardware status bit read check" */
while ((mibspiREG1->FLG & 0x01000000U) != 0U)              <---------------------------------------------------------
{
} /* Wait */

When examining the mibspi1 registers it appears that any register that has not been written to up to this point has the value 0xCDCDCDCD

which does not seem correct.

6763.RM57_SPI.hcg.txt

I have attached the halcogen config file as well as a register dump.0842.mibspiRegs.logAny ideas what might be going on?

Victor