PEAK-GPS: Looking for 10hz @ 667k baudrate

Programmable Sensor Module with CAN Connection
Post Reply
quytran
Posts: 4
Joined: Thu 17. Sep 2020, 00:36

PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by quytran » Thu 17. Sep 2020, 00:49

Hello,

I just recently purchased a PEAK-GPS sensor module and looking for plug-and-play setup. At the moment, the delivered firmware is 1 hz @ 500k baudrate. I know that there's an example for the 10hz firmware, but would like to know how to modify the code for 667k baudrate.

What ide/programming environment and hardware will I need? Currently, I am using a 12V power supply + VN1630A (Vector CAN interface) to check the traffic. Windows 10 environment.

Is there also an easy way to export the frame ids into a DBC?

Many thanks in advance!

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by M.Heidemann » Thu 17. Sep 2020, 12:13

Hello,

You need to use another PCAN-Interface-device (For example a PCAN-USB) to flash the firmware of your PCAN-GPS.

Please download our Development package for ARM-based products:

https://www.peak-system.com/quick/DLP-DevPack

This package contains all the necessary software and tools for compiling the firmware, as well as the firmware-examples for the PCAN-GPS:

PATH: PEAK-DevPack\Hardware\PCAN-GPS\Examples

Make sure to read the "ReadMe.txt" contained in that package, it describes how can use the examples with VS-Code and directly be able to initiate compilation of the examples out of VS-Code.

For further information on how to use the software included, refer to the documentation for PCAN-GPS , starting from chapter 6.1.:

https://www.peak-system.com/produktcd/P ... an_eng.pdf


Furthermore you will need to add an additional Baudrate in the can_user.h file of the 06_GPS-10hz Example:

Code: Select all

#define		CAN_BAUD_667K		(	0 << 14 |	10 << 16 |	2 << 20 |	11)
Please make sure you use this Baudrate upon initializing the CAN-Channel in can_user.c:

Code: Select all

	//! init CAN 
	CAN_InitChannel(CAN_BUS_HNDL, CAN_BAUD_667K);

I attached the exported DBC-file (PCAN-GPS Symbols) for you:
PCAN_GPS_EXPORTED.zip
(1.91 KiB) Downloaded 4707 times

For the export of the Symbol File (.sym) to DBC can be done with PCAN-Explorer 6 and the CANdb Import-AddIn.

PCAN-Explorer 6:

https://www.peak-system.com/PCAN-Explor ... .html?&L=1

CANdb Import-AddIn:

https://www.peak-system.com/PE6-CANdb-I ... .html?&L=1


For further questions feel free to contact me again.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

quytran
Posts: 4
Joined: Thu 17. Sep 2020, 00:36

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by quytran » Wed 14. Oct 2020, 05:50

Hello Marvin,

Thank you for the starting tips! Hope this message finds you well.

I've modified the can_user.h and .c file accordingly. I've attempted to run "make all" after "make clean" and received this error:
PS C:\AdvEng\PEAK_GPS\Hardware\PCAN-GPS\Examples\08_GPS_10Hz_667kbd> make clean
ECHO is off.
-------- begin --------
ECHO is off.
Cleaning project:
rm -f ./dep/*
rm -f ./lst/*
rm -f ./obj/*
rm -f ./out/*
ECHO is off.
Errors: none
ECHO is off.
-------- end --------
ECHO is off.
PS C:\AdvEng\PEAK_GPS\Hardware\PCAN-GPS\Examples\08_GPS_10Hz_667kbd> make all
The system cannot find the path specified.
ECHO is off.
-------- begin --------
ECHO is off.
process_begin: CreateProcess((null), arm-none-eabi-gcc --version, ...) failed.
make (e=2): The system cannot find the file specified.
C:\HighTec\TriCore\bin\make.exe: *** [gccversion] Error 2
Any idea regarding root cause/solution?

In addition to the Build toolchain that was included in the Developer Pack, I've also installed the GNU toolchain for 2017 here: C:\Program Files (x86)\GNU Tools ARM Embedded\7 2017-q4-major

NOTE: It seems like Yogarto is not being supported (moved from website) by the developer anymore? I was not able to download/install Yogarto.

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by M.Heidemann » Wed 14. Oct 2020, 09:14

Hello,

Seems like your PATH-variable is not correctly setup for building the firmware files.

Both the build-tools and the compiler need to be referenced, maybe the another "make" reference in your PATH variable is causing this.

I would recommend the following:

Please download the PEAK-Dev pack:

https://www.peak-system.com/quick/DLP-DevPack

And install Visual Studio Code.

Copy your current project in the right subfolder:

PEAK-DevPack/Hardware/PCAN-GPS/Examples

Afterwards run the "SetPath_for_VSCode" vbs-file, this will automatically generate configuration-files for VS Code that set the right paths, etc.

Open Visual Studio Code and got via "File" -> "Open Folder" and open a folder with an firmware Example, e.g "03_Timer".

Then go to "Terminal" an select "Run Task...":
DevPack_Run_Task.PNG
DevPack_Run_Task.PNG (38.6 KiB) Viewed 8263 times
There you'll find several options:
DevPack_RunTask_Options.PNG
DevPack_RunTask_Options.PNG (8.17 KiB) Viewed 8263 times
"Compile File" will build the currently opend file
"Compile File ARM" will build the currently opened file for ARM7
"Flash Device" -> This will open PEAK-Flash for you, so can flash the frimware onto your device.
"Make all" will build the firmware example completely
"Make Clean" Will clean up compilation leftovers, etc.

Please select the "Make all" option, the produced firmware file (.bin) will be located in the project folder subdirectory "out":
DevPack_Build.PNG
DevPack_Build.PNG (14.35 KiB) Viewed 8263 times
DevPack_Out.PNG
DevPack_Out.PNG (15.34 KiB) Viewed 8263 times
DevPack_FirmwareFile.PNG
DevPack_FirmwareFile.PNG (11.78 KiB) Viewed 8263 times

Please report back to me, if this has resolved your issue.

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

quytran
Posts: 4
Joined: Thu 17. Sep 2020, 00:36

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by quytran » Fri 16. Oct 2020, 00:01

Hello Marvin,

Good news! I was able to "Run Task" via the "Terminal" ribbon in VS Code. Successful "make all".

Using PcanFlash.exe, I was able to flash the firmware onto the PEAK-GPS module. Note, the images/instructions in the hardware manual are out-of-date for the current PcanFlash.exe version.

In any case, it looks like I have a functional 10hz 667kbd GPS sensor module. Appreciate all your help!

I am now looking at changing the CAN IDs. Is there any special variables/parameters that I will need to change for Extended CAN 2.0B? My assumption is I can use PCAN-View to export the new .dbc from the .sym file.

Also, how do I check whether the module is looking at a specific navigation system? Is there a variable/parameter that I will have to modify to enable GLONASS for example?

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by PEAK-Support » Fri 16. Oct 2020, 08:16

In the new documentaion (will be available within the next weeks), you will also find the Info how to use the new PEAK-Flash Tool instead the old PCAN-Flash (we recommend not to use the PCAN-Flash Tool any longer)
The IDs are part of the can_user.c file - check the code - it is well documented for software developers it should be no problem to find the #defines for the single ID´s and change it for your need.

The unit use the u-box MAX-7 GPS/GNSS module, a Data Sheet is part of the package or could be found on our WEB side PDF
Inside this document you find all Information how to setup the device for a specific GPS system. How to run using the GLONASS system is part of the sample code 07_GLONASS.
Note: GLONASS and GPS signals cannot be received and tracked simultaneously by u-blox 7 modules. (see PFD page 8)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

quytran
Posts: 4
Joined: Thu 17. Sep 2020, 00:36

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by quytran » Mon 19. Oct 2020, 19:00

Looking at this more specifically, I will have to modify the following addresses here:

Code: Select all

/*******************************************************************************
 local definitions
 ******************************************************************************/

#define SYM_BMC_ACCELERATION	0x600
#define SYM_BMC_MAGNETIC_FIELD	0x601

#define SYM_L3GD_ROTATION_01	0x610
#define SYM_L3GD_ROTATION_02	0x611

#define SYM_GPS_STATUS			0x620
#define SYM_GPS_COURSE_SPEED	0x621
#define SYM_GPS_POS_LONGITUDE	0x622
#define SYM_GPS_POS_LATITUDE	0x623
#define SYM_GPS_POS_ALTITUDE	0x624
#define SYM_GPS_DELUSIONS_01	0x625
#define SYM_GPS_DELUSIONS_02	0x626
#define SYM_GPS_DATE_TIME		0x627

#define SYM_IO					0x630

#define SYM_RTC_TIME			0x640


#define SYM_OUT_IO				0x650
#define SYM_OUT_POWEROFF		0x651
#define SYM_OUT_GYRO			0x652
#define SYM_OUT_ACC_SCALE		0x653
#define SYM_OUT_SAVE_CFG		0x654
#define SYM_OUT_RTC_SET_TIME		0x655
#define SYM_OUT_RTC_ADOPT_GPS_TIME	0x656
#define SYM_OUT_ACC_FAST_CALIBRATION	0x657

#define INCOMING_CAN_ID_MIN	0x650
#define INCOMING_CAN_ID_MAX	0x657


#define STORE_ACC_COMPENSATION_PERMANENT 1

/*******************************************************************************
 local function prototypes
 ******************************************************************************/
#ifndef EEPROM_CFG_ADDR
#define EEPROM_CFG_ADDR 0x00
#endif
Do I also need to change the TxMsg.Type = CAN_MSG_STANDARD to CAN_MSG_EXTENDED? Pardon me, it is my first time working with CAN. Example below:

Code: Select all

//------------------------------------------------------------------------------
//! void CAN_UserSendBMCDataAcc(void)
//------------------------------------------------------------------------------
//! @brief	Sends last read data of the BMC050 sensor
//------------------------------------------------------------------------------
void CAN_UserSendBMCDataAcc(void){
	CANMsg_t TxMsg;
	u8_t tmp8u=0;

	TxMsg.Id  = SYM_BMC_ACCELERATION;
	TxMsg.Len = 8;
	TxMsg.Type = CAN_MSG_STANDARD;
	TxMsg.Data.Data16[0] = BMC050_Readings.Acceleration_X;
	TxMsg.Data.Data16[1] = BMC050_Readings.Acceleration_Y;
	TxMsg.Data.Data16[2] = BMC050_Readings.Acceleration_Z;
	TxMsg.Data.Data8[6] = BMC050_Readings.Temperature;
	MEMS_BMC050_GetVertialAxis(&tmp8u);
	TxMsg.Data.Data8[7] = (tmp8u&0x3) | (BMC050_Readings.orientation&0x7)<<2;
	CAN_UserWrite(&TxMsg);

	// allow task for reading new values
	BMC050_Readings.acc_data_valid = FALSE;

	return;
}
Also, it was mentioned that I would need PCAN-Explorer 6 + CANdb Add-in (+$500 USD). Is there an alternative for exporting .sym to .dbc?

M.Heidemann
Sales & Support
Sales & Support
Posts: 1083
Joined: Fri 20. Sep 2019, 13:31

Re: PEAK-GPS: Looking for 10hz @ 667k baudrate

Post by M.Heidemann » Tue 20. Oct 2020, 09:15

Hello,

if you need to change the IDs to extended IDs then yes, you'll have to change the message type of the transmit-message as well.

Please keep in mind that all changes neeed to be applied to the symbol/dbc file as well.

We can send you a dbc-version of the delivery sym file, in case you are ableto use dbc files and edit them to your changes accordingly.

For this, please contact us via mail -> support[at]peak-system.com

Best Regards

Marvin
---
Marvin Heidemann
PEAK-Support Team

Post Reply