Hi Juan,
Yes, you need to double check if CS is working fine.
I faced similar issues in the past because CS was not working correctly.
BR,
Alan
On 3/1/18, Juan FM <
jflor...@gmail.com> wrote:
> Hi!
> I continue my adventure in NuttX a after make it run I2C in the Olimex, I'm
>
> playing with SPI but I have some problems.
> So this is the situation, I want to use the RFID-RC522 tag reader, which
> have fully working driver and a APP that works too. But the problem is the
> port of NuttX for my board it hasn't integrate the SPI yet(I mean when the
> pin mapping and configuration is not set yet), so I've done the next
> changes to make it available:
>
> - In the file board.h I added:
>
>
> - I added the files : stm32_mfrc522.c and stm32_spi.c. Also added to the
>
> makefile.
> - In the stm32_bringup file, I added theses lines:
>
>
>
> - Finally in the stm32_boot file I added this inside the
> board_initialize function:
>
>
>
>
> After theses changes, I connect the logic analyzer and I try to run it, and
>
> I receive this good looking image:
>
> (Channel 3 is the enable signal)
> As you can see MISO is returning the same command that I send to it, like a
>
> echo and the enable is not active.
>
> The only moment that the enable is active, is at the startup of the system,
>
> and then come back to high level(Next imagen).
>
> Then a 2 ms later, it come back to high level.
>
> Finally in the menuconfig, I follow the steps given in the Alan's video.
>
> So I think that the problem might be related to the CS SPI pin, that maybe
> I'm not doing a properly set-up.
> On other hand I'm not fully understanding how it works SPI in NuttX,
> because you initiliaze the SPI Bus and in a different part you initialize
> the GPIO pin that control the CS, but at anytime it's called the gpiowrite
> function to modify the state of the pin
>
> Thank you for your time!!
>
> Juan
>
> --
> You received this message because you are subscribed to the Google Groups
> "NuttX" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
nuttx+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
>