Unable to find Arducam support for ATSAM4L with 5M camera in ASF project

Hi everyone, I’ve been searching around and I just can’t find any Arducam support for the ATSAM4L MCU. Before I start pulling my hair out, has anyone here actually gotten an Arducam working with this chip? I’m hitting a wall just trying to find a starting point.

Welcome to the forum. Before we dig in, can you tell us a bit more about what you’re trying to do? Which Arducam module are you using, and what does the overall setup look like? That’ll help us point you in the right direction.

Sure. I’m trying to connect a 5M Arducam camera to an ATSAM4L MCU. The whole thing is going into a custom battery-powered standalone device. It only needs to capture a few JPEG images per day, so power consumption is a big deal for us. I’m developing in Microchip Studio (formerly Atmel Studio) using the ASF framework. It’s for an agriculture IT monitoring project at my company.

Got it, thanks for the details. Do you happen to have any code you can share, or logs from when you tried to initialize the camera? Even a small snippet would help narrow things down.

Unfortunately no code or logs yet, I haven’t gotten far enough to write anything. So far I’ve only been searching for Arducam support or example code for the ATSAM4L and I’ve come up completely empty. That’s why I posted here, I wanted to check if there’s something I’m missing before I try to port anything blindly.

That explains it. Looking at your setup: you’re building a battery-powered standalone device that captures a few JPEGs a day, connecting a 5M Arducam to an ATSAM4L, working in Microchip Studio with ASF. The reason you can’t find anything is simple - there’s no direct Arducam support or demo for the ATSAM4L. So it’s not something you missed, it just doesn’t exist as a dedicated example.

Thanks for confirming that, I was starting to wonder if I was searching wrong. So is there any reference I can use at all, or am I completely on my own for this port?

There is a solid reference you can use. Take a look at the Arducam Mega example firmware for the Microchip SAM E54 Xplained Pro (same54_xpro): Arducam_Mega/examples/MicroChip/same54_xpro_arducam_mega/firmware at main · ArduCAM/Arducam_Mega · GitHub

Even though it isn’t written specifically for the ATSAM4L, that SAM E54 example is still your best starting point. Both are Microchip MCUs, and the example is built on the ASF framework, so a lot of the peripheral setup and the Arducam SPI communication flow will translate over. You’ll likely need to adapt the pin mappings and some of the clock/peripheral configuration for the ATSAM4L, but the core camera interaction logic should carry across.