Your second photo needs to be reloaded as a separate sighting - the two photos are of different species. The first is in the family Fabaceae, subfamily Mimosoideae. The second (with the flower photo), a species of Tribulus, is in the family Zygophyllaceae.