element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Moto Mods
  • Products
  • Manufacturers
  • Moto Mods
  • More
  • Cancel
Moto Mods
Forum Problem configuring the Pi Camera
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Moto Mods to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 56 subscribers
  • Views 595 views
  • Users 0 members are here
Related

Problem configuring the Pi Camera

leo.andrade
leo.andrade over 8 years ago

I am trying to use the Pi Camera Module (v1.3) with the Raspberry Pi HAT Adapter.

 

The steps that I had executed were:

 

1) Get the code, hw manifest and nuttx config from picamera sample project:

$ cd $BUILD_TOP/nuttx/nuttx/tools

$ ./configure.sh hdk/muc/picamera

 

2) I used all the default configuration from the picamera in the menuconfig. I had only changed the following item because my module is 1.3 (instead of 2.0):

-> Device Drivers

--> Mods High Speed Bus (MHB) driver Support

---> MHB Camera

----> OV5674 Raspberry Pi Module      = Y

----> IMX219 Raspberry Pi Module (v2) = N

 

3) Turned on the Dip Switch A1. The rest of them were off.

 

4) VIO switch in Rasp HAT Adapter set to 3P3.

 

When I open the camera app in my Moto Z, the message Camera Error: Please restart camera is shown.

 

In the dmesg logs, the following is shown:

[14889879.801] apbe_pwrctrl_op_set_mode: power mode=1

[1488987320.819] mhb_rx_thread: ERROR: Invalid length=7f00

[1488987320.824] mhb_handle_pm_status_not: PM status: 1

[1488987320.824] _mhb_camera_slave_status_callback: slave status 1 wait_event=0xfe03

[1488987320.837] mhb_handle_pm_status_not: PM status: 3

[1488987320.837] hb_camera_slave_status_callback: slave status 3 wait_event=0xfe03

[1488987320.841] _mhb_camera_wait_for_response: INFO: Time spent on PEERONNECTED 1508ms Result 0

[1488987321.903] _mhb_camera_wait_for_response: ERROR: Time spent on CDSI CONFIG 1013ms Result 6E

[1488987321.908] m_camera_sm_wait_stream_process_ev: FAILED s_state 3 event -1. Powering Off

 

Does someone had this problem? Do you know what could be wrong?

 

Thanks

  • Sign in to reply
  • Cancel
  • motomodsdev
    motomodsdev over 8 years ago

    Your setup appears correct, could you please provide a log from the MuC?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • leo.andrade
    leo.andrade over 8 years ago in reply to motomodsdev

    Hi.

     

    Follow the complete logs:

    *** turn on the phone with the Moto Mod
    [1489165984.723] _power_on: mhb_camera_csi: bootmode: 0
    [1489165984.725] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_POWER_ON
    [1489165984.741] mhb_camera_power_on: soc_status = 0 apbe_en_state = 0, bootmode = 0
    [1489165984.959] _power_off: mhb_camera_csi : bootmode 0
    [1489165984.963] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_OFF
    [1489165984.972] _power_on: mhb_camera_csi: bootmode: 0
    [1489165984.974] mhb_camera_sm_wait_off_process_ev: Dumped 2 event\s
    [1489165984.980] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_POWER_ON
    [1489165985.234] _power_off: mhb_camera_csi : bootmode 0
    [1489165985.238] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_OFF
    [1489165985.247] _power_on: mhb_camera_csi: bootmode: 0
    [1489165985.250] mhb_camera_sm_wait_off_process_ev: Dumped 3 event\s
    [1489165985.253] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_POWER_ON
    [1489165985.506] _mhb_camera_ext_ctrl_get: Cam not ready, try again. CtrlID 0x0000002a State MHB_CAMERA_STATE_WAIT_POWER_ON
    [1489165986.232] _mhb_camera_slave_status_callback: slave status 1 wait_event=0xfe03
    [1489165986.246] _mhb_camera_slave_status_callback: slave status 3 wait_event=0xfe03
    [1489165986.258] _mhb_camera_wait_for_response: INFO: Time spent on PEER CONNECTED 467ms Result 0
    [1489165986.264] mhb_camera_sm_execute: MHB_CAMERA_STATE_ON
    [1489165986.267] mhb_camera_power_on: soc_status = 2 apbe_en_state = 3, bootmode = 0
    [1489165986.272] _mhb_camera_ext_ctrl_get: Cam Ready, Process. CtrlID 0x0000002a State MHB_CAMERA_STATE_ON
    [1489165986.297] _power_off: mhb_camera_csi : bootmode 0
    [1489165986.301] mhb_camera_sm_execute: MHB_CAME_STATE_WAIT_OFF
    [1489165986.375] _power_on: mhb_camera_csi: bootmode: 0
    [1489165986.377] mhb_camera_sm_wait_off_process_ev: Dumped 1 event\s
    [1489165986.381] mhb_camera_sm_execute: M_CAMERA_STATE_WAIT_POWER_ON
    [1489165986.386] mhb_camera_power_on: soc_status = 2 apbe_en_state = 3, bootmode = 0
    [1489165986.393] mhb_camera_sm_execute: MHB_CAMERA_STATE_ON
    [1489165986.600] _power_off: mhb_camera_csi : bootmode 0
    [1489165986.602] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_OFF
    [1489165986.729] mhb_camera_sm_execute: MHB_CAMERA_STATE_OFF
    [1489165986.732] mhb_camera_power_off: soc_status = 2 apbe_en_state = 3
    [1489165986.743] _mhb_camera_slave_status_callback: slave status 0 wait_event=0x0000
    
    
    *** openning the camera app
    [1489166090.233] _power_on: mhb_camera_csi: bootmode: 1
    [1489166090.235] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_POWER_ON
    [1489166090.249] mhb_camera_power_on: soc_status = 0 apbe_en_state = 0, bootmode = 1
    [1489166091.191] _stream_on: mhb_camera_csi : bootmode 1
    [1489166091.194] mhb_camera_sm_execute: MHB_CAMERA_STATE_WAIT_STREAM
    [1489166091.732] _mhb_camera_slave_status_callback: slave status 1 wait_event=0xfe03
    [1489166091.749] _mhb_camera_slave_status_callback: slave status 3 wait_event=0xfe03
    [1489166091.753] _mhb_camera_wait_for_response: INFO: Time spent on PEER CONNECTED 468ms Result 0
    [1489166091.759] mhb_camera_stream_on: 
    [1489166092.816] _mhb_camera_wait_for_response: ERROR: Time spent on CDSI CONFIG 1011ms Result 6E
    [1489166092.820] mhb_camera_stream_on: UNIPRO Config failed. Reset & Retry APBE Status 0
    [1489166092.832] _mhb_camera_slave_status_callback: slave status 0 wait_event=0xfe03
    [1489166094.318] _mhb_camera_slave_status_callback: slave status 1 wait_event=0xfe03
    [1489166094.332] _mhb_camera_slave_status_callback: slave status 3 wait_event=0xfe03
    [1489166094.336] _mhb_camera_wait_for_response: INFO: Time spent on PEER CONNECTED 1507ms Result 0
    [1489166094.381] mhb_camera_i2c_write: i2c err -110
    [1489166094.383] mhb_camera_i2c_write: INFO I2C write retried 1 of 5 : ret 0
    [1489166095.431] _mhb_camera_wait_for_response: ERROR: Time spent on CDSI CONFIG 1019ms Relt 6E
    [1489166095.436] mhb_camera_stream_on: UNIPRO Config failed. Reset & Retry APBE Status 0
    [1489166095.449] _mhb_camera_slave_status_callback: slave status 0 wait_event=0xfe03
    [1489166096.934] _mhb_camera_slave_status_callback: slave status 1 wait_event=0xfe03
    [1489166096.948] _mhb_camera_slave_status_callback: slave status 3 wait_event=0xfe03
    [1489166096.952] _mhb_camera_wait_for_response: INFO: Time spent on PEER CONNECTED 1507ms Result 0
    [1489166098.016] _mhb_camera_wait_for_response: ERROR: Time spent on CDSI CONFIG 1017ms Result 6E
    [1489166098.022] mhb_camera_sm_wait_stream_process_ev: FAILED s_state 3 event -1. Powering Off
    [1489166098.028] mhb_camera__execute: MHB_CAMERA_STATE_OFF
    [1489166098.033] mhb_camera_power_off: soc_status = 2 apbe_en_state = 3
    [1489166098.048] _mhb_camera_slave_status_callback: slave status 0 wait_event=0x0000

     

    Any ideia what could be wrong?

     

    Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • motomodsdev
    motomodsdev over 8 years ago in reply to leo.andrade

    It appears that the Moto High Speed Bridge (or it's equivalent on the MotoZ) is failing configuration.

    1. On the Pi camera module, does the LED turn on when the camera is started?

    2. Do you have access to a Hasselblad camera to ensure there isn't somehow an issue on the MotoZ side?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • leo.andrade
    leo.andrade over 8 years ago in reply to motomodsdev

    1. The red LED turn on when the camera is started, but it is turned off as soon as the error happens.

    2. I do not have the Hasselblad available to be tested. But I am going to try with another Moto Z.

     

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • leo.andrade
    leo.andrade over 8 years ago in reply to leo.andrade

    My HAT Adapter board was defective. I changed it for a new one and the camera is working correctly.

    Thanks for your help.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube