Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GNSE_BSP_Ext_Sensor_I2C2_Init() Failure #240

Open
Hexagon3626 opened this issue Aug 1, 2022 · 1 comment
Open

GNSE_BSP_Ext_Sensor_I2C2_Init() Failure #240

Hexagon3626 opened this issue Aug 1, 2022 · 1 comment

Comments

@Hexagon3626
Copy link

Environment:

Windows 10
STM32CubeIDE v10.0.0
Generic Node Sensor Edition v1.1

Summary:
Basic Project fails when adding GNSE_BSP_Ext_Sensor_I2C2_Init(); within main.c. No problems occur when external i2c is not called or with GNSE_BSP_Sensor_I2C1_Init(); that is already in place

No I2C timings or other parameters have been changed

HAL_Init() and GNSE_BSP_Sensor_I2C1_Init(); is called before GNSE_BSP_Ext_Sensor_I2C2_Init();

Steps to Reproduce:

  1. ... Build basic project for GNSE
  2. ... Add GNSE_BSP_Ext_Sensor_I2C2_Init() to main

What do you see now?

Output UART log initialises some peripherals but also states data being received over UART despite no connection:

"01/08/2022 18:36:21", Testing on-board peripherals 

"01/08/2022 18:36:24", Testing on-board peripherals 

"01/08/2022 18:36:24", Testing battery monitoring functionality 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

"01/08/2022 18:36:24", DEBUG_USART data received 

What do you want to see instead?

The standard output below with external i2c working to add functionality

"01/08/2022 18:32:22", Testing on-board peripherals 

"01/08/2022 18:32:22", Testing battery monitoring functionality 

"01/08/2022 18:32:22", MCU internal reference voltage 2832 mv 

"01/08/2022 18:32:22", Battery voltage 3045 mv 

"01/08/2022 18:32:22", Testing LED functionality 

"01/08/2022 18:32:22", Toggling LED lights 

"01/08/2022 18:32:28", Testing secure element functionality 

"01/08/2022 18:32:28", 1) Enabling LOAD_SWITCH_SENSORS 

"01/08/2022 18:32:28", 2) Attempting to read secure element serial number 

"01/08/2022 18:32:28", SE Serial Number:          01 23 88 ce f5 c3 72 5b 27 

"01/08/2022 18:32:28", SE Device EUI:             00 04 a3 10 00 1a b1 8c 

"01/08/2022 18:32:28", SE Application/Join EUI:   70 b3 d5 7e d0 00 00 00 

"01/08/2022 18:32:28", Testing on board sensors functionality 

"01/08/2022 18:32:28", Attempting to read sensors data 

"01/08/2022 18:32:28", Measured Temperature: 28'C & Relative Humidity: 39 

"01/08/2022 18:32:29", Measured Temperature: 28'C & Relative Humidity: 39 

"01/08/2022 18:32:31", Measured Temperature: 28'C & Relative Humidity: 39 

"01/08/2022 18:32:32", Measured Temperature: 28'C & Relative Humidity: 39 

"01/08/2022 18:32:33", Measured Temperature: 28'C & Relative Humidity: 39 

"01/08/2022 18:32:35", Accelerometer acceleration [mg]: X: 24.00	 Y: 9.00	 Z: -745.00

"01/08/2022 18:32:35", Accelerometer Temperature sensor [degC]:  33.00

"01/08/2022 18:32:36", Accelerometer acceleration [mg]: X: 30.00	 Y: 11.00	 Z: -874.00

"01/08/2022 18:32:36", Accelerometer Temperature sensor [degC]:  33.25

"01/08/2022 18:32:37", Accelerometer acceleration [mg]: X: 26.00	 Y: 8.00	 Z: -1010.00

"01/08/2022 18:32:37", Accelerometer Temperature sensor [degC]:  33.25

"01/08/2022 18:32:38", Accelerometer acceleration [mg]: X: 26.00	 Y: 10.00	 Z: -1006.00

"01/08/2022 18:32:38", Accelerometer Temperature sensor [degC]:  32.75

"01/08/2022 18:32:39", Accelerometer acceleration [mg]: X: 31.00	 Y: 7.00	 Z: -1002.00

"01/08/2022 18:32:39", Accelerometer Temperature sensor [degC]:  33.50

"01/08/2022 18:32:40", Testing on board external flash functionality 

"01/08/2022 18:32:40", 1) Enabling LOAD_SWITCH_FLASH 

"01/08/2022 18:32:40", 2) Attempting to read & write to external flash 

"01/08/2022 18:32:40",	Start initializing the device and controller
"01/08/2022 18:32:40",	Start matching the device ID
"01/08/2022 18:32:40",		 SPI, ID: C22815
"01/08/2022 18:32:40",  ------MxSimpleTest Start!------
"01/08/2022 18:32:40",  ID: C22815
"01/08/2022 18:32:40",  Sr: 00
"01/08/2022 18:32:40",	ERASE START
"01/08/2022 18:32:41",	ERASE DONE
"01/08/2022 18:32:41",		 **Start Dump data=> address        0
"01/08/2022 18:32:41",		            Length=> 20
"01/08/2022 18:32:41",		 READ address=> 00000000
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000001
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000002
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000003
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000004
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000005
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000006
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000007
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000008
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000009
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000a
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000b
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000c
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000d
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000e
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000000f
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000010
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000011
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000012
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000013
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000014
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000015
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000016
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000017
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000018
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 00000019
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001a
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001b
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001c
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001d
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001e
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",		 READ address=> 0000001f
"01/08/2022 18:32:41",		         data=> FF
"01/08/2022 18:32:41",		     expected=> FF
"01/08/2022 18:32:41",	ERASE PASS
"01/08/2022 18:32:41",	PROGRAM DONE
"01/08/2022 18:32:41",		 **Start Dump data=> address        0
"01/08/2022 18:32:41",		            Length=> 20
"01/08/2022 18:32:41",		 READ address=> 00000000
"01/08/2022 18:32:41",		         data=> 00
"01/08/2022 18:32:41",		     expected=> 00
"01/08/2022 18:32:41",		 READ address=> 00000001
"01/08/2022 18:32:41",		         data=> 01
"01/08/2022 18:32:41",		     expected=> 01
"01/08/2022 18:32:41",		 READ address=> 00000002
"01/08/2022 18:32:41",		         data=> 02
"01/08/2022 18:32:41",		     expected=> 02
"01/08/2022 18:32:41",		 READ address=> 00000003
"01/08/2022 18:32:41",		         data=> 03
"01/08/2022 18:32:41",		     expected=> 03
"01/08/2022 18:32:41",		 READ address=> 00000004
"01/08/2022 18:32:41",		         data=> 04
"01/08/2022 18:32:41",		     expected=> 04
"01/08/2022 18:32:41",		 READ address=> 00000005
"01/08/2022 18:32:41",		         data=> 05
"01/08/2022 18:32:41",		     expected=> 05
"01/08/2022 18:32:41",		 READ address=> 00000006
"01/08/2022 18:32:41",		         data=> 06
"01/08/2022 18:32:41",		     expected=> 06
"01/08/2022 18:32:41",		 READ address=> 00000007
"01/08/2022 18:32:41",		         data=> 07
"01/08/2022 18:32:41",		     expected=> 07
"01/08/2022 18:32:41",		 READ address=> 00000008
"01/08/2022 18:32:41",		         data=> 08
"01/08/2022 18:32:41",		     expected=> 08
"01/08/2022 18:32:41",		 READ address=> 00000009
"01/08/2022 18:32:41",		         data=> 09
"01/08/2022 18:32:41",		     expected=> 09
"01/08/2022 18:32:41",		 READ address=> 0000000A
"01/08/2022 18:32:41",		         data=> 0A
"01/08/2022 18:32:41",		     expected=> 0A
"01/08/2022 18:32:41",		 READ address=> 0000000B
"01/08/2022 18:32:41",		         data=> 0B
"01/08/2022 18:32:41",		     expected=> 0B
"01/08/2022 18:32:41",		 READ address=> 0000000C
"01/08/2022 18:32:41",		         data=> 0C
"01/08/2022 18:32:41",		     expected=> 0C
"01/08/2022 18:32:41",		 READ address=> 0000000D
"01/08/2022 18:32:41",		         data=> 0D
"01/08/2022 18:32:41",		     expected=> 0D
"01/08/2022 18:32:41",		 READ address=> 0000000E
"01/08/2022 18:32:41",		         data=> 0E
"01/08/2022 18:32:41",		     expected=> 0E
"01/08/2022 18:32:41",		 READ address=> 0000000F
"01/08/2022 18:32:41",		         data=> 0F
"01/08/2022 18:32:41",		     expected=> 0F
"01/08/2022 18:32:41",		 READ address=> 00000010
"01/08/2022 18:32:41",		         data=> 10
"01/08/2022 18:32:41",		     expected=> 10
"01/08/2022 18:32:41",		 READ address=> 00000011
"01/08/2022 18:32:41",		         data=> 11
"01/08/2022 18:32:41",		     expected=> 11
"01/08/2022 18:32:41",		 READ address=> 00000012
"01/08/2022 18:32:41",		         data=> 12
"01/08/2022 18:32:41",		     expected=> 12
"01/08/2022 18:32:41",		 READ address=> 00000013
"01/08/2022 18:32:41",		         data=> 13
"01/08/2022 18:32:41",		     expected=> 13
"01/08/2022 18:32:41",		 READ address=> 00000014
"01/08/2022 18:32:41",		         data=> 14
"01/08/2022 18:32:41",		     expected=> 14
"01/08/2022 18:32:41",		 READ address=> 00000015
"01/08/2022 18:32:41",		         data=> 15
"01/08/2022 18:32:41",		     expected=> 15
"01/08/2022 18:32:41",		 READ address=> 00000016
"01/08/2022 18:32:41",		         data=> 16
"01/08/2022 18:32:41",		     expected=> 16
"01/08/2022 18:32:41",		 READ address=> 00000017
"01/08/2022 18:32:41",		         data=> 17
"01/08/2022 18:32:41",		     expected=> 17
"01/08/2022 18:32:41",		 READ address=> 00000018
"01/08/2022 18:32:41",		         data=> 18
"01/08/2022 18:32:41",		     expected=> 18
"01/08/2022 18:32:41",		 READ address=> 00000019
"01/08/2022 18:32:41",		         data=> 19
"01/08/2022 18:32:41",		     expected=> 19
"01/08/2022 18:32:41",		 READ address=> 0000001A
"01/08/2022 18:32:41",		         data=> 1A
"01/08/2022 18:32:41",		     expected=> 1A
"01/08/2022 18:32:41",		 READ address=> 0000001B
"01/08/2022 18:32:41",		         data=> 1B
"01/08/2022 18:32:41",		     expected=> 1B
"01/08/2022 18:32:41",		 READ address=> 0000001C
"01/08/2022 18:32:41",		         data=> 1C
"01/08/2022 18:32:41",		     expected=> 1C
"01/08/2022 18:32:41",		 READ address=> 0000001D
"01/08/2022 18:32:41",		         data=> 1D
"01/08/2022 18:32:41",		     expected=> 1D
"01/08/2022 18:32:41",		 READ address=> 0000001E
"01/08/2022 18:32:41",		         data=> 1E
"01/08/2022 18:32:41",		     expected=> 1E
"01/08/2022 18:32:41",		 READ address=> 0000001F
"01/08/2022 18:32:41",		         data=> 1F
"01/08/2022 18:32:41",		     expected=> 1F
"01/08/2022 18:32:42",	MxSelfTest End!

"01/08/2022 18:32:42", Simple external SPI flash (MX25R1635F) test passed!

"01/08/2022 18:32:42", Finished on-board testing, blinking LEDs forever 
@azerimaker
Copy link
Contributor

Thanks, @gsbwallace1996 for reporting this. I'll try to reproduce it and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants