Jump to content
  • 0

SPI on analog discovery 2 getting wrong values on wrong channels


jiw

Question

So I am confused what is going on, I am using a stm nucleo g070rb and a w25q128fv eeprom from Winbond.

I can communicate alright through the stm32.

I have double checked the wiring for the analog discovery 2.

I am getting what appears to be the clock on the chip select line, and other weirdness.

If I disconnect the purple wire(D2) which is the CS from the analog discovery 2, the value does not change, I still see the clock on the select in the view.

 

For the program I am just doing:

      HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
      HAL_Delay(10);
      HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
      HAL_SPI_Transmit(&hspi1, (uint8_t *)&EEPROM_RJEDEC, 1, 100);
      HAL_SPI_Receive(&hspi1, (uint8_t *)uart_buf, 3, 100);
      HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);

I am reading the JEDEC Manufacture

I sent 1 byte from the STM32 (master), and get 3 bytes from the Winbond (slave)

This works, I get 0xEF, 0x40, 0x18 from the Winbond chip and I can print it out from the stm32. 

So why is the waveforms view not showing this and why is the CS line going up and down instead of the clock? MISO is also not showing the data.

1280070631_Screenshot2021-02-13162748.thumb.png.be6519f1ad4906fc9e3f1a3699dc5aea.png

connecrtions.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @jiw,

I would have to guess that either the wires are mis-placed or that there is a different SPI flash chip being used which has a different layout.

The reason for this is that it is my understanding the Logic Analyzer in WaveForms software only measures the digital signal values; the label names of Select, Clock, MOSI, and MISO are purely for cosmetic convenience for the visual grouping of signals; there is no other software interpretation that is done.

Thanks,
JColvin

Link to comment
Share on other sites

Thanks for the reply, hmm I have double and triple checked the wiring, there is no issue there as far I can tell.

Since it asks me which wire is connected where, e.g the purple D2 is connected to the chip select, it should show the chip select right? It's just odd how it's showing me the clock there in the view.

Like even if I unplug the purple wire (D2, which is supposed to be the chip select), I still see the clock moving in the view on D2. I can't tell if it's a software problem or maybe even my analog discovery 2 is broken.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...