using problem with SPI on Kinetis K50 Tower

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

using problem with SPI on Kinetis K50 Tower

Jump to solution
935 Views
khris
Contributor I

Hello,

I am testing  SPI  on Kinetis K50 Tower,  my problem is that when I init SPI register as :

 

 SPI0_MCR   =  SPI_MCR_MSTR_MASK |

                            SPI_MCR_DIS_RXF_MASK | 
                           SPI_MCR_DIS_TXF_MASK | SPI_MCR_ROOE_MASK | 
                           SPI_MCR_HALT_MASK |
                            SPI_MCR_PCSIS(1);              

 

the cpu go in "hard fault"  isr  vector 3

 

If i write SPI0_MCR = 0  there is the same problem.

For information, with debugger it is not possible to write a value in this register.

 

I verify init  MUX  pin select and cpu version without result, all seem ok.

 

 if someone have an idea ?

 

Thanks for your help

 

 

 

 

 

 

0 Kudos
1 Solution
506 Views
konrada
Contributor IV
  1. Have you set the SIM_SCGC bits for the SPI component?
  2. In a hard fault, look at SCB_CFSR, it tells you what kind of hard fault you're in.

View solution in original post

0 Kudos
2 Replies
507 Views
konrada
Contributor IV
  1. Have you set the SIM_SCGC bits for the SPI component?
  2. In a hard fault, look at SCB_CFSR, it tells you what kind of hard fault you're in.
0 Kudos
506 Views
khris
Contributor I

 

very good, it 's bit 12 of SIM_SCG6

 

now there is acces to register and no "hard fault"

 

Thank you very much

0 Kudos