Dear Nuttx,
I'm trying according to your instructions. But still cannot read sensor. I
don't understand why ID is 0x00000000.
[cid:07735f7d-1a47-42b7-b827-0e7af231fa04]
Is it related with SPI CS pin. I tried with MEMS Chip select pin to
1. ground
2. PC1
[cid:9cafed8e-3666-4626-8067-702173b5350c] 3. PF6(NSS pin)
But still I cannot get data from sensor. Can you suggest me please.
And according to your instuction,
$ make menuconfig
Build Setup --->
Debug Options --->
[*] Enable Debug Features
[*] Enable Error Output
[*] Enable Warnings Output
[*] Enable Informational Debug Output
[*] Sensor Debug Features
[*] Sensor Error Output
[*] Sensor Warnings Output
[*] Sensor Informational Output
I enable these in menu config, how can i check sensor error ouput, warning
output, etc. Please advise me.
Best Regards,
Marlar
________________________________
From: Alan Carvalho de Assis <[email protected]>
Sent: Friday, December 11, 2020 7:07 PM
To: [email protected] <[email protected]>
Cc: Shee Cheng Yap <[email protected]>
Subject: Re: ADXL372 sensor test fail
You need to enable the Sensors debug to see these sensor's messages:
$ make menuconfig
Build Setup --->
Debug Options --->
[*] Enable Debug Features
[*] Enable Error Output
[*] Enable Warnings Output
[*] Enable Informational Debug Output
[*] Sensor Debug Features
[*] Sensor Error Output
[*] Sensor Warnings Output
[*] Sensor Informational Output
BR,
Alan
On 12/11/20, Xiang Xiao <[email protected]> wrote:
> nuttx/include/errno.h define ENODEV to 19:
> #define ENODEV 19
> and nuttx/drivers/sensors/adxl372.c return ENODEV if id mismatch:
> static int adxl372_dvr_open(FAR void *instance_handle, int32_t arg)
> {
> /* Read the ID registers */
>
> pnpid = adxl372_read_id(priv);
> priv->readonly = false;
>
> sninfo("ADXL372_ID = 0x%08x\n", pnpid);
>
> if ((pnpid & 0xffffff00) != (ADXL372_DEVID_AD_VALUE << 24 |
> ADXL372_DEVID_MST_VALUE << 16 |
> ADXL372_PARTID_VALUE << 8))
> {
> snwarn("ERROR: Invalid ADXL372_ID = 0x%08x\n", pnpid);
>
> priv->readonly = true;
> set_errno(ENODEV);
> }
> You have to check what's the value in pnpid.
>
> On Fri, Dec 11, 2020 at 2:28 PM Marlar Chan <[email protected]> wrote:
>
>> Dear Nuttx,
>> I'm testing with stm32f429-disco with adxl372 sensor. I tried to run
>> sample demo adxl372_test. Device id is seen on /dev. But sensor cannot
>> start run and i face with the following issue. Please suggest me any idea
>> what is wrong with it.
>>
>> Best Regards,
>> Marlar
>> ------------------------------
>>
>> CONFIDENTIALITY: This email is intended solely for the person(s) named
>> and
>> may be confidential and/or privileged. If you are not the intended
>> recipient, please delete it, notify us and do not copy, use, or disclose
>> its contents.
>> Towards a sustainable earth: Print only when necessary. Thank you.
>>
>