Go Down

Topic: NINA-W10x Symbol Difference in Vidor Schematic vs. MKR 1010 - GPIO_16, etc. (Read 376 times) previous topic - next topic

jwestmoreland

Hello All,

I noticed the NINA-W10x symbols in the MRK 1010 and MKR4K Vidor are different - I checked with the uBlox datasheet as well - all 3 of these are attached.

Look at GPIO16, 17, and 18; for instance, on the 1010 schematic vs. the Vidor - you'll see the net names on the symbols are different.

I've written a couple of builds that should blink the leds that are connected to the NINA only - and checked that against the 1010 (I may need to fix the sketch on that one) - does anyone know if the ESP firmware does any remapping of the I/O lines?

I haven't found yet if it's OK to call GPIO_16 16 so to speak in the blinky example under getting-started in the ESP firmware.  Just setting that correctly and loading the build - (hint - use the firmware loader for NINA and copy it to the 1.1.0 dir....)(...because the esptool.py method doesn't work) should blink at least one of the LED's that isn't mapped to the ARM or FPGA.

Thanks,
John W.

tksm372

Hi john,

I found that the mapping between NINA_W10 and esp32 is described on pp.16-17 of NINA-W10 datasheet:
https://www.u-blox.com/sites/default/files/NINA-W10_DataSheet_%28UBX-17065507%29.pdf

For example, GPIO16 of the NINA_W10(GPIO_16,RMII_RXD0,DAC_16/WM.WM_PIO16) is connected to GPIO25 (which is usually called "IO25" on the esp32 datasheet) of the esp32.

I think when you write code to blink IO25 using ESP-IDF, an LED connected to the NINA_W10 on VIDOR 4k will be blinking with blue color.
Minatsu Tukisima

jwestmoreland

Thanks Minatsu,

I'd looked at those pages and totally missed those columns.

I've made a test build that blinks all 3 of the RGB LED's in a FreeRTOS task - I've included that in this post - if anyone wants to try that - I've tested it with the WiFiWebClient build and that works.

/* Blink Example

  This example code is in the Public Domain (or CC0 licensed, at your option.)

  Unless required by applicable law or agreed to in writing, this
  software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "sdkconfig.h"

void blink_task(void *pvParameter);

/* Can run 'make menuconfig' to choose the GPIO to blink,
  or you can edit the following line and set a number here.
*/
// #define BLINK_GPIO CONFIG_BLINK_GPIO
#define BLINK_GPIO1 GPIO_NUM_25
#define BLINK_GPIO2 GPIO_NUM_26
#define BLINK_GPIO3 GPIO_NUM_27

#if 0
void blink_task(void *pvParameter)
{
   /* Configure the IOMUX register for pad BLINK_GPIO (some pads are
      muxed to GPIO on reset already, but some default to other
      functions and need to be switched to GPIO. Consult the
      Technical Reference for a list of pads and their default
      functions.)
   */
   gpio_pad_select_gpio(BLINK_GPIO);
   /* Set the GPIO as a push/pull output */
   gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);
   while(1) {
       /* Blink off (output low) */
       gpio_set_level(BLINK_GPIO, 0);
       vTaskDelay(1000 / portTICK_PERIOD_MS);
       /* Blink on (output high) */
       gpio_set_level(BLINK_GPIO, 1);
       vTaskDelay(1000 / portTICK_PERIOD_MS);
   }
}
#endif
#if 0
void app_main()
{
   xTaskCreatePinnedToCore(&blink_task, "blink_task", configMINIMAL_STACK_SIZE, NULL, 5, NULL, 1);
}
#endif

void blink_task(void *pvParameter)
{
   /* Configure the IOMUX register for pad BLINK_GPIO (some pads are
      muxed to GPIO on reset already, but some default to other
      functions and need to be switched to GPIO. Consult the
      Technical Reference for a list of pads and their default
      functions.)
   */
gpio_reset_pin ( BLINK_GPIO1 );
gpio_reset_pin ( BLINK_GPIO2 );
gpio_reset_pin ( BLINK_GPIO3 );
// gpio_set_pull_mode ( BLINK_GPIO1,
gpio_pullup_dis ( BLINK_GPIO1 );
gpio_pullup_dis ( BLINK_GPIO2 );
gpio_pullup_dis ( BLINK_GPIO3 );
gpio_pulldown_dis ( BLINK_GPIO1 );
gpio_pulldown_dis ( BLINK_GPIO2 );
gpio_pulldown_dis ( BLINK_GPIO3 );

gpio_set_drive_capability ( BLINK_GPIO1, GPIO_DRIVE_CAP_MAX );
gpio_set_drive_capability ( BLINK_GPIO2, GPIO_DRIVE_CAP_MAX );
gpio_set_drive_capability ( BLINK_GPIO3, GPIO_DRIVE_CAP_MAX );

gpio_pad_select_gpio(BLINK_GPIO1);
   /* Set the GPIO as a push/pull output */
gpio_set_direction(BLINK_GPIO1, GPIO_MODE_OUTPUT);
gpio_pad_select_gpio(BLINK_GPIO2);
   /* Set the GPIO as a push/pull output */
gpio_set_direction(BLINK_GPIO2, GPIO_MODE_OUTPUT);
gpio_pad_select_gpio(BLINK_GPIO3);
gpio_set_direction(BLINK_GPIO3, GPIO_MODE_OUTPUT);
gpio_set_level(BLINK_GPIO1, 0);
gpio_set_level(BLINK_GPIO2, 0);
gpio_set_level(BLINK_GPIO3, 0);
while(1) {
/* Blink off (output low) */
gpio_set_level(BLINK_GPIO1, 0);
gpio_set_level(BLINK_GPIO2, 1);
gpio_set_level(BLINK_GPIO3, 0);
vTaskDelay(1000 / portTICK_PERIOD_MS);
/* Blink on (output high) */
gpio_set_level(BLINK_GPIO1, 1);
gpio_set_level(BLINK_GPIO2, 0);
gpio_set_level(BLINK_GPIO3, 1);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
}

I'll post a build that works with the MKR Vidor 4K shortly.

For NINA MKR 1010 - copy the attached to the 1.2.1 dir and run the Firmware Updater.

Thanks Again,
John

jwestmoreland

The attached build will blink the Blue and Green LEDs on the MKR Vidor 4K boards.
It was tested with the WifiWebClient sketch - the leds blink ~1s on/off.

The SHA 256 sig for this (.bin) file is:
758875f9a42ad9167534995d9158e4e285e87a745b45d898ec6248dc68e4a65c

Copy to the 1.1.0 dir of the Firmware update utility and use the Firmware updater to download for the 4K.

Regards,
John W.

Go Up