Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Pinout for STM32F1 "blue pill" #6

Closed
Selective031 opened this issue Sep 23, 2020 · 11 comments
Closed

Pinout for STM32F1 "blue pill" #6

Selective031 opened this issue Sep 23, 2020 · 11 comments
Labels
help wanted Extra attention is needed Support Library support

Comments

@Selective031
Copy link

Selective031 commented Sep 23, 2020

Hi,

I have an issue with communicating with my "Adafruit atwinc1500 breakout board".
Its connected to a Blue Pill (STM32F103C8T6), using Arduino IDE 1.8.3 and Arduino Core 1.9.0
Pins:
MISO,MOSI,SCK (PA7,PA6,PA5)
PA4 - CS
PA3 - IRQ
PA2 - Reset
But I cannot communicate with the board.
I´m a little puzzled with the pinout found in the "Wifinina_pinout_generic.h" file.

Any help is very appreciated!

UPDATE, I can load the official WiFi101 library and I´m able to print out the firmware version using one of the examples, but I cannot run anything else. This would at least tell me the wiring is correct. But running the same "CheckFirmwareVersion" in WiFiNINA Generic does not work.

@khoih-prog
Copy link
Owner

@tcpipchip

Can you offer some help here as I don't have the STM32F103C8T6.

@khoih-prog khoih-prog added the help wanted Extra attention is needed label Sep 23, 2020
@tcpipchip
Copy link

hi @Selective031

Here was my connection using my MCU with W102 (WIFININA)

See in right size the PINOUT of WIFININA

image

@Selective031
Copy link
Author

Hi @tcpipchip

I´m using this schematic,
image

How would I translate this in wifinina_pinout_generic.h file ?

I tried to do it like this:
image

But I get no response from the board.

@tcpipchip
Copy link

looks right!
Its the WIFININA ALIVE ?
Has the firmware inside ?
Can you measure on Osciloscope if there is answer ?

@Selective031
Copy link
Author

If I load the official WIFI101 (https://www.arduino.cc/en/Reference/WiFi101)
and use the "CheckWiFi101FirmwareVersion"
and add "WiFi.setPins(PA4,PA3,PA2)"
it will print out the firmware version, so it is working. However that library is not made for STM32 and will not work.

So my hope is WiFiNINA library ;)

@khoih-prog
Copy link
Owner

@tcpipchip and @Selective031

Just some info FYI. To use ATWINC1500 is a little bit tricky, and you have to experiment and explore yourself. It's difficult to help without the related hardware.

ATWINC1500 Wiring-and-Test

Selection_560

Selection_561

@tcpipchip
Copy link

tcpipchip commented Sep 23, 2020

sorry, i had seen that you was using STM32

@Selective031
Copy link
Author

@khoih-prog Exactly, so when running this:

image

it will give me a reply in serial monitor:

image

@khoih-prog
Copy link
Owner

@Selective031 @tcpipchip

I currently don't think ATWINC1500 is supported by WiFiNINA/WiFiNINA_Generic library because there is no code to drive the IRQ pin which is actively used in ATWINC1500/WiFi101 library. Certainly just a good guess as I have no hardware to check.

In WiFi101 lib:

1. In WiFi.cpp

void WiFiClass::setPins(int8_t cs, int8_t irq, int8_t rst, int8_t en)
{
  gi8Winc1501CsPin = cs;
  gi8Winc1501IntnPin = irq;
  gi8Winc1501ResetPin = rst;
  gi8Winc1501ChipEnPin = en;
}

2. In bsp/source/nm_bsp_arduino.c

int8_t gi8Winc1501CsPin = WINC1501_SPI_CS_PIN;
int8_t gi8Winc1501ResetPin = WINC1501_RESET_PIN;
int8_t gi8Winc1501IntnPin = WINC1501_INTN_PIN;
int8_t gi8Winc1501ChipEnPin = WINC1501_CHIP_EN_PIN;

...

void nm_bsp_register_isr(tpfNmBspIsr pfIsr)
{
	gpfIsr = pfIsr;
	attachInterruptMultiArch(gi8Winc1501IntnPin, chip_isr, FALLING);
}

...

void nm_bsp_interrupt_ctrl(uint8 u8Enable)
{
	if (u8Enable) {
		attachInterruptMultiArch(gi8Winc1501IntnPin, chip_isr, FALLING);
	} else {
		detachInterruptMultiArch(gi8Winc1501IntnPin);
	}
}

So it's better to use another shield for WiFiNINA library, such as Ublox W102, etc

@tcpipchip
Copy link

W102 i know that works very fine on STM32, because i already tested!

@Selective031
Copy link
Author

Ok guys, thanks for trying!
You can close this.

@khoih-prog khoih-prog added the Support Library support label Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed Support Library support
Projects
None yet
Development

No branches or pull requests

3 participants