Catalyzes the condensation of 2 ATP molecules into cyclic di-AMP (c-di-AMP), a second messenger used to regulate differing processes in different bacteria. 2 ATP = 3',3'-c-di-AMP + 2 diphosphate Probably oligomerizes. Probably essential, it was not disrupted in a global transposon mutagenesis study. Belongs to the adenylate cyclase family. DacB/CdaS subfamily.