This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC1768 SPI failure for flash_fs

Hi
I had made a board with LPC1768 and wrote code for UART, ADC, SD_File, Ethernet, CAN etc. All working
I ordered for new boards with solder mask, with no difference on chip connections. Again almost everything such as UART, ADC, Ethernet and ... are working, just SD File is not working

I looked at SCK0 using an oscilloscope in the first board (Even with SD out) and I could see obvious clock pulses
Then I looked at SCK0 of the second board, I was just having SCK0 driven low for a short time and then high state again

Could anyone suggest me how I can figure out the problem?

To check SPI, I wrote another simple code, I could see pulses on SCK0, but when I use finit(NULL), it's not working

Thank you in advance for your help

Parents
  • Thank you for your excellent comments
    Your ideas are right, but I have tried most of them already

    I had 2 sample boards, both with working SD interface
    then I assembled 4 other boards, none of them are working

    I thought maybe SPI module of the chip cannot work on these pins, but when I programmed another sample SPI project and I could see SCK pulses, I forgot about this idea

    I have jlink to debug. Although I am sure my problem is in hardware, because the code has been tested already, but I'd like to figure out WHAT Happens? and WHERE exactly the chip cannot continue to be able to discover why?!

    But finit is not a function that I can step in, and see where it stops and figure out why SCK is not generating pulses while it can generate pulse for other SPI (not SD related) code

Reply
  • Thank you for your excellent comments
    Your ideas are right, but I have tried most of them already

    I had 2 sample boards, both with working SD interface
    then I assembled 4 other boards, none of them are working

    I thought maybe SPI module of the chip cannot work on these pins, but when I programmed another sample SPI project and I could see SCK pulses, I forgot about this idea

    I have jlink to debug. Although I am sure my problem is in hardware, because the code has been tested already, but I'd like to figure out WHAT Happens? and WHERE exactly the chip cannot continue to be able to discover why?!

    But finit is not a function that I can step in, and see where it stops and figure out why SCK is not generating pulses while it can generate pulse for other SPI (not SD related) code

Children