canbootloader:Use Micro hal and arch selection

nxp/s32k14x:board_identity: Return length of mfguid

nxp/s32k14x:CAN driver

nxp/s32k14x:Drver Added ABORT on error

canbootloader:Use N words for first word

canbootloader:Ensure the up_progmem API always defined
This commit is contained in:
David Sidrane
2021-02-24 19:20:15 +01:00
committed by Lorenz Meier
parent ea255234da
commit 62c0c96749
20 changed files with 1303 additions and 62 deletions
@@ -51,6 +51,7 @@ __BEGIN_DECLS
#include <s32k1xx_pin.h>
#include <s32k1xx_lpspi.h>
#include <s32k1xx_lpi2c.h>
#include <s32k1xx_flexcan.h>
//#include <s32k1xx_uid.h>
/* s32k1xx defines the 128 bit UUID as
@@ -111,4 +112,16 @@ __BEGIN_DECLS
#define px4_arch_gpiosetevent(pinset,r,f,e,fp,a) s32k1xx_gpiosetevent(pinset,r,f,e,fp,a)
#define I2C_RESET(q)
/* CAN bootloader usage */
#define TIMER_HRT_CYCLES_PER_US (STM32_HCLK_FREQUENCY/1000000)
#define TIMER_HRT_CYCLES_PER_MS (STM32_HCLK_FREQUENCY/1000)
#define crc_HiLOC S32K1XX_CAN0_RXIMR27
#define crc_LoLOC S32K1XX_CAN0_RXIMR28
#define signature_LOC S32K1XX_CAN0_RXIMR29
#define bus_speed_LOC S32K1XX_CAN0_RXIMR30
#define node_id_LOC S32K1XX_CAN0_RXIMR31
__END_DECLS
@@ -107,4 +107,23 @@ __BEGIN_DECLS
#define PX4_GPIO_PIN_OFF(def) (((def) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_2MHz))
/* CAN bootloader usage */
#define TIMER_HRT_CYCLES_PER_US (STM32_HCLK_FREQUENCY/1000000)
#define TIMER_HRT_CYCLES_PER_MS (STM32_HCLK_FREQUENCY/1000)
/* CAN_FiRx where (i=0..27|13, x=1, 2)
* STM32_CAN1_FIR(i,x)
* Using i = 2 does not requier there block
* to be enabled nor FINIT in CAN_FMR to be set.
* todo:Validate this claim on F2, F3
*/
#define crc_HiLOC STM32_CAN1_FIR(2,1)
#define crc_LoLOC STM32_CAN1_FIR(2,2)
#define signature_LOC STM32_CAN1_FIR(3,1)
#define bus_speed_LOC STM32_CAN1_FIR(3,2)
#define node_id_LOC STM32_CAN1_FIR(4,1)
__END_DECLS