no trunnions, so likely not an aimable mortar or cannon, may have been strapped to a carriage of some sort, too big & too recent for a hand cannon. too short for much. s缠mall cannon were used for line throwing but would have had trunnions . small rail mounted anti-personnel cannon would have had trunnions to mount it on a swivel. my guess is a signal cannon for a larger ship.
coehorn mortar, trunnions on base
small swivel gun, trunnions again
this small late 18c - early 19c howitzer is close, but has trunnions again.
lyle gun (line throwing)

trunnions again - this is a big lyle.
more traditional brass one in high polish
here's the whole gubbins with the coast guard crew to service it.
aha! a trunnion-less one mounted on a fixed base!
this is a signal gun used to start yacht races
note that 19-20c cannon of this type would have a lanyard operated percussion firing device threaded into it rather than a touch hole. removal would leave a larger hole than we'd expect for one fired by a slow match.
one for a lyle gun