Jump to content
  • 0

MCC172 multi hat continuous sampling issue



I have a stack of 7 hats, I have read all the EEPROMS & they can all be seen when I list the hats. I have given each hat its own number using the jumpers on the board 0-6 with the MASTER being 0, all the lights are green.

I am using the multi_hat_synchtonous_scan code as my base & have changed DEVICE_COUNT = 7

The code was working fine for 2 hats but now I get a segmentation error during the trigger set up as soon as it tries to configure device 2.

The line that throws the error,

convert_chan_mask_to_string(chan_mask[device], chan_display[device]);

What am I missing here?

Edited by NicR
wrong device number, additional information
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0


convert_chan_mask_to_string simply converts the channel mask to a string for display purposes. It has nothing to do with the MCC 172. It can be found in daqhat_utils.h, which is in /daqhats/examples/C/. 

Best regards,


Link to comment
Share on other sites

  • 0

Any idea why it would throw a segmentation error?

It falls over when checking

while (channel_mask > 0)

Isn't the channel mask the same for every device? What would be different for the 3rd device in the stack do you think?


I found it, I hadn't declared all the channels in the chan_mask declaration

Edited by NicR
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...