AnsweredAssumed Answered

ADUCM360 SPI problem

Question asked by erwan on Mar 21, 2016
Latest reply on Mar 22, 2016 by ABuda

I try to use the SPI0 in the aducm360

I did this simple routine :


  #define GP1CON * ((unsigned long *)(0x40006030))

  #define SPI0_TX * ((unsigned long *) (0x40004008))

  #define SPI0DIV * ((unsigned long *) (0x4000400C))

  #define CLKDIS * ((unsigned long *) (0x4000202C))

  #define SPI0_CON * ((unsigned long*) (0x40004010))

  #define CLKCON0 * ((unsigned long*) (0x40002000))



  GP1CON = GP1CON|0x200; //P1.4

  GP1CON |= 0x800; //P1.5

  GP1CON |= 0x2000; //P1.6

  GP1CON |= 0x8000; //P1.7

  CLKCON0 = 0x40;


  SPI0DIV=0X07; //clk à 1MHZ

  SPI0_CON = 0x802;

  SPI0_CON = 0x803; //enable SPI

  SPI0_TX = 0x0A;



Then, when i debug it i have to refresh my debug windows to see the register value changing for the CLKDIS (0x4000202C).

furthermore,  when i want to see my signal in the oscilloscope i only see the chip select and clk moving when i refresh the register windows.


How can i do to make it work non only in debug mode but continuously ?


Thank you