How to bring up the afbrs50 driver in cubeorangeplus

I used the functions they provided to perform SPI, IRQ, timer, and GPIO environment verification (Argus_VerifyHALImplementation). The test results show that all 9 items passed, but whenever I call their API, the response is always a failure, whether it’s Argus_Init, Argus_InitMode, or Argus_SetConfigurationFrameTime. I am currently looking into applying this driver to can-flow. Has anyone encountered this issue? How can it be resolved?

########################################################

Running HAL Verification Test - v1.4

########################################################

  • SPI Slave: 5

1 > Timer Plausibility Test
1 > PASS

2 > Timer Wraparound Test
2 > PASS

3 > SPI Connection Test
3 > PASS

4 > SPI Maximum Data Length Test
4 > PASS

5 > GPIO Interrupt Test
5 > PASS

6 > GPIO Mode Test
EEPROM readout status OK
EEPROM readout status OK
EEPROM readout status OK
EEPROM Readout succeeded!

  • Module: 1
  • Device ID: 2624
    6 > PASS

7 > Lifetime Counter Timer (LTC) Test
EEPROM readout status OK
RCOTrim = 3
±------±--------±-----------+
| count | samples | elapsed us |
±------±--------±-----------+
| 1 | 100 | 10104 |
| 2 | 200 | 20389 |
| 3 | 300 | 30441 |
| 4 | 400 | 40612 |
| 5 | 500 | 50727 |
| 6 | 600 | 60869 |
| 7 | 700 | 71015 |
| 8 | 800 | 81173 |
| 9 | 900 | 91307 |
| 10 | 1000 | 101724 |
±------±--------±-----------+
Linear Regression: y(x) = 1015E-7 sec * x + -311E-7 sec
7 > PASS

8 > Periodic Interrupt Timer (PIT) Test
Run PIT Test (w/ 200000 us interval): - expected event count: 5 - expected interval: 200000 us, min: 199000 us, max: 201000 us - expected first event: 200000 us, min: 195000 us, max: 205000 us

  • actual event count: 5 - actual interval: 200001 us - actual first event: 199998 us - actual last event: 1000004 us

  • test status: 0

Run PIT Test (w/ 10000 us interval): - expected event count: 10 - expected interval: 10000 us, min: 9950 us, max: 10050 us - expected first event: 10000 us, min: 9750 us, max: 10250 us

  • actual event count: 10 - actual interval: 10006 us - actual first event: 10000 us - actual last event: 100056 us

  • test status: 0

Run PIT Test (w/ 1000 us interval): - expected event count: 500 - expected interval: 1000 us, min: 995 us, max: 1005 us - expected first event: 1000 us, min: 925 us, max: 1075 us
PIT test failed! Waiting for the PIT interrupt events yielded a timeout. Timeout: 501000 us; Elapsed: 501118 us (499 of 500 events).First event @ 1000 us, last event @ 500466 us - actual event count: 499 - actual interval: 1000 us - actual first event: 1000 us - actual last event: 500466 us

  • test status: -6

WARNING: PIT test failed for 1000 us interval!
This is only critical if high frame rates (up to 1000 fps)
need to be achieved. Otherwise, the error can be safely ignored.
8 > PASS

9 > SPI Interrupt Test
.1 >> SPI Transfer from SPI Interrupt Test
Invoking SPI transfer from task level…
Verify read data…
.1 >> PASS

.2 >> SPI Transfer from GPIO Interrupt Test
Invoking SPI transfer from GPIO interrupt callback…
Verify read data…
.2 >> PASS

.3 >> SPI Transfer from PIT Interrupt Test
Verify read data…
.3 >> PASS

9 > PASS

########################################################

PASS: HAL Verification Test finished successfully!

########################################################
ERROR [afbrs50] Invalid mode parameter: 0
ERROR [afbrs50] Argus_InitMode failed: -6